Fix a bug where a module global was being overwritten.