@OlegValter I considered this, but then, these variables in the "declarative record" are always visible in the debugger(old editor, v8 engine under "block" scope). But here, even debugger doesn't list it. On a side note,
this comment says a "enumerator" is missing in the v8 source code of apps script.