SI-8153 Mutation is hard, let's go shopping with an empty list

Changed the implementation of iterator to be more robust to mutation of the underlying ListBuffer.

Not ready to be merged; tests needed, but first I need to see if existing tests fail (and my laptop can't handle the tests).