Internal modification to forloop

Increment forloop index on compilation and reset them for delta
execution