Fixed #562 -- when trying to reopen a module, only look in the local scope, not any parent scopes.