Undigging this one but I have a similar problem and hopefully just found a solution.
Could this work? :
(considering the "object" object type has an "index" number instance variable, and that there are 5 instances of "object")
at the start of layout
Repeat (5)
pick loopindex instance of object (pick Nth)
set variable object.index to loopindex
From now on, you can start using the "index" instance variable as if it where the instance's IID, as it won't change throughout the layout. Not 100% sure that a loop at the start of layout will play... (anyone know?) but if it don't, it could be put in a group that triggers only one.
I also have another question : is the IID of the first instance on the layout always 0, or, if there are other instances of this object still alive on previous level, would the first instance on the current layout be more than 0?
And if it could be more than IID 0, is there a way to still give them correct "index" numbering, i.e. : 0, 1, 2, 3, 4, etc...
This would require to take the instance with the lowest IID and assign the 0 number to its index instance variable, but I have no idea how to do it... Anyone knows?