Hi,
You simply need to balance your "begin xxx" and "end xxx" gui actions, and the error will go away.
using ArrayListgetnext is the way to go if you debug, and you only update when you want to make sure it's up to date. I am not sure what is the relation between your gameobjects and an array index, so I can't say for sure if other solution worth experimenting.
Bye,
Jean