I would like to iterate over all instances of an object family, and for each instance, I would like to create a new instance.
The issue is that it sometimes creates multiple instances of the same object, and I don't understand why.
In my playground, I have two instances, A and B, and expect another A and B to be created.
But instead, sometimes it creates AA, BB, AB. I would understand that when iterating over the instances, it includes the newly created once, but then I would expect an infinite loop which also doesn't happen. Instead, it only always creates two new instances.
To avoid an infinite loop, I added another condition to ensure it only iterates over the instances off-screen. But it is still the same issue.
Does anyone have an idea what's going wrong here?