[Fix #1501] Make sure offenses are printed after infinite loop

Makes it easier to figure out what went wrong.