Modified ModuleInstaller so it prunes duplicate modules.