Changed map in Modules to use ModuleKey instead of ModuleName which is not unique.