Before this, if a new global was added to JS code (module toplevel, function bodies are not considered) it would blow up when attempting to resolve variable refs & uses. Make the toplevel scope a defaultdict such that if e.g. a "foo" is looked up in a module but not a local variable of that module it's assumed to be an UnknownNS object (from which further UnknownNS can be deref'd).