More info:
The problem occurs when there is a debug.print statement in a loop