when you create an object, the process doesn't complete until the next top level event.
your "on start of layout" event loops through each spawner, creating a new tiledbackground object, but those objects wont be ready until event 4 is completely finished.
so, in your code, event 3 was trying to pick the family object by its id2 variable, but that will fail because the new object is not ready yet. Only the pick last created, or pick by uid will work at that point.
putting a wait 0 seconds as an action will defer other actions under that until the end of the current tick, by which time the new objects will be ready, but people quite often create other problems if they don't use that properly.
you were using iid which is not as reliable as uid. iid for an object will change if you destroy an earlier instance of that object. the uid will not change, and is the same for the original object and the same object under the family name.
so, picking by the variable would have worked fine - but not until the after the object is fully created.