local only works on global variables. (Anything in the symbol table.)
(lexicals) variables don't exist in the symbol table.
I realized I didn't really answer the question you where trying to ask. Declaring a
variable at the top of a file at worst is polluting one file. If you are writing the code and the files aren't huge, it's not all that hard to avoid shooting yourself in the foot with a little dilligence.