Fix bug when the combined package DB has duplicate package IDs
Someone on IRC reported that they were encountering a strange missing module error from GHC, and it turned out that they had mtl-22.214.171.124 installed in both the global and local DB, with the same InstalledPackageId. The two packages should be interchangeable, but we were forgetting to eliminate duplicates in part of the package-processing phase in GHC. Really I should switch this code over to use the new PackageIndex data type in Cabal, which ought to make things simpler.
Showing with 12 additions and 4 deletions