Fixes globalvar variable access in scripts

This change makes it so that any variable that is user-defined global
will remove any dot access generated during parsing (including scripts.)