Fix replacers being picked if whatProvide was called before building the package whitelist, fixes #2991, fixes #2962
Make Git::cleanEnv static
Extract functionality from GitDownloader to make it more reusable
Fix var name