OH MY GOD THANK YOU YOU JUST HELPED ME SOLVE THE BUG
WHEN THE PLAYER GETS HIT THE COLLISIONS ARE TEMPORARILY TURNED OFF, AND THE LOOPING IS BASED ON COLLISIONS. I CANT BELIEVE I HADNT SEEN THIS SOONER!!!
I'll try and remember to fix it once I get home! Unfortunately I can't actually update the game 'till the jam rating is over :(