Remove modules that exist in the submodule's config.