Eveything fine in legacy debug, but not when I use rapid debug - just discovered that. That for loop has been in there for a whole days worth of succesful compilations till now.
I've gone back to debug key, problem still there so seems only related to Rapid Debug
I get it too.
Erel should have a look at it.
As a workaround use a local variable in the for / Next loop and set the global variable to local one after the loop if you need it.