[walker] Create global scope for scopeVisitor

Fixes crash when vars/functions declared in global scope.