Track target names separately

At some point, using the keys began returning package names
alphabetically and not in insertion order, which we were relying on