Check: local var stack not big enough
This doesn't happen for global variables. Another thing is, even with wait time set to 0, local variable value is still gone. Sometimes the wait can happen forever (more than the value I entered, even for 1 second).
Plugins used: Function, XML, and Chrome Console.