This is because the i variable is in fact a global variable, because inline functions do not have a scope for default variables.
In order to fix it, just create a local variable before using the loop:
inline function one() { local i = 0; for (i = 0; i < 20; i++) { two(); } } inline function two() { local i = 0; for (i = 0; i < 10; i++) { Console.print(i); } }