I saw a similar problem in Dimension À by Dav999. After rescuing a crewmate, a script was executed, but not normally. After Viridian was teleported to another room all of the internal crew-mates created were floating, a terminal was transformed into a grey cremate and green enemies created later appeared as :verdigris:s.
I wasn't the only one which got this problem, and realized the version of the game is unrelated.
It has to do with the fact that the script box was in the same place as the crew-mate. Here's a quote from FIQ, from the level's thread:
Also, what Roskilla is explaining is a common problem with dialog "clashes".
If you find a trinket, or a crewmate, the game freezes untill you press ACTION to remove the dialog (or wait if it's a crewmate). If another script happens to execute at the same time, the game freezes completely. Viridian will most likely float, and entity sprite data reverts to 0 (a happy crewmate standing on floor looking right). The only way to revert to normal is to fire up the level editor, start a level, exit, and start it again, and then exit. That, or restarting VVVVVV.
Never ever have scripts that can trigger the same time as trinketfound/crewmatefound, simple as that.
But I don't know how entity sprite data being reset to 0 has to do with transforming enemies to crew-mates of their colour and terminals to grey crew-mates.

I suspect it also happens with simplified scripting, making it a real glitch.
Off-topic: How would a script with gotoroom make

flip repeatedly? Do you mean gotoposition?