This change speeds up the process of checking variable declaration
within the scope by replacing the iteration through all declared
variables (without the ability to exit early from the loop) with hash
map lookups.
This change cuts google maps loading by 17s on my computer.