Don't generate loops in trees.
Don't generate loops in trees.

	We only want to append to last if we're actaully expanding
	the match frontier. It's a bug to add it if it's unused.

oridb/mc,oridb/mc,oridb/mc,oridb/mc