Oh, so it getting stuck there is a bug...
I had the same issue! Solving the puzzle with repeat loops or not didn't matter, it was stuck until restarting the app completely. (Did not need to start a New Game!) Maybe something wasn't resetting correctly after the first few attempts while I was initially writing my spell?