Undid a fix accidentally committed as "Merged".
Fixed enclosing scope information by the type checker in case of
imported modules.