Wrapped removeGlobals in a global check to prevent removal of the module that was just added.