BTW, I've seen in some other thread that using the foreach "Doesn't require localization ... as the value gets turned to nil when the loop finishes". See my PrintABC function in the previous post. IMO it still requires localization since it could cause clashes with surrounding (also calling) functions. Say the var variable had a global value, at the end this value is still retained. But if I didn't localize it the value would be nil.
Also note, lisp has what's called "closures". A simple explanation is that you would get the same effect if the testlocal-sub was defined outside of the testlocal. I.e. the localizations apply to "when the function is called" not "where it is made".