in reply to Back step in foreach loop

In my case I'm not really worried about an endless loop, but I will implement one of the solutions that checks for it. Thanks for all the feedback, this site looks like a great resource.