fix #7272, error for declaring a var both local and global

in a couple places we were depending on `local` overriding `global`;
these are now cleaned up as well.
Merge branch 'master' of github.com:JuliaLang/julia