Get out of the infinite loop by allowing to scan backwards when the current token is a comment.

This fixes issue #9002.
Actually, an even nicer improvement would be to change `while (true) { }` to `do { } while (!(ctx.pos.line === 0 && ctx.pos.ch === 0))`.  This way we wouldn't need the manual `break` calls after each `movePrevToken()`, and we get a little more safety in case this code changes more in the future.