Protect iterations from stuffing the stack when a child node points somewhere up
to a parent, causing it to go into an infinite loop (I think a person would have
to do this deliberately, pretty much).