(PUP-1073) Fix detecting alias collisions

Making the uniqueness_key more complex than name for packages means that
testing whether name matches title is an insufficient test for whether
to check if the resource is defined and add an alias.