When dupping loops, take care to fix up references to them held by break/continue statements.