Ensure that RemoveReference removes the correct version.

In case a shared local repository has multiple versions of the same package in it.