I'm using the tool since a certain time and I really like it

However, In my opinion is really a pity that there is no implementation of a FUNCTION feature to get back variables in a safe way.
Anyway, I use SRT feature with the LOCALVARS paradigm.
I have carefully read the definition of Local Scope for variables, but something is not yet clear to me. I still experiment unexpected behaviors with variable localization.
Can someone explain me what is wrong and how should I use correctly LOCALVARS?
Simple example:
==============
' Global variables
Let>var_a=1
Let>var_b=2
Let>var_c=3
Let>Var_d=4
Gosub>Level1
SRT>Level1
Let>LOCALVARS=1
Let>var_d=2
Let>var_a=100
GoSub>Level2
Let>LOCALVARS=1
' Puts back environment to scope 1
' Result is 3 as expected
Let>var_d=var_d+1
'Result=11 , why? , should be 101 that is var_a in level 1
'Instead var_a works with global scope
Let>var_a=var_a+1
END>Level1
SRT>Level2
Let>LOCALVARS=1
Gosub>Level3
Let>var_a=200
' result is 201 as expected
Let>var_a=var_a+1
END>Level2
SRT>Level3
Let>LOCALVARS=1
Let>var_d=300
Let>LOCALVARS=0
Let>var_a=10
' Put back to level 3
Let>LOCALVARS=1
' result is 301 as expected
Let>var_d=var_d+1
END>Level3