The cause for the problem was that the layout got updated
while iterating causing the mess within the iterator.
This solution is to lock the layout while an iterator
is present. This happens for various Cell and Shapes
iterator, so it's a major enhancement.