An informed (no pun intended) guess (I'm not an expert on the internals
of Inform) is that it's because objectloop works by traversing a linked
list of objects (moving from each object to its sibling). When you
execute
move i to room_name
object i is removed from the player and its sibling is set to nothing.
*After* this has happened, objectloop tries to continue with the object's
sibling, which is nothing...
The Designer's manual specifically warns against doing things like this.
I'm sorry, but I'm not good enough at Inform to suggest a better solution.
Magnus