pkgclean: Fix keeping proper pkg when duplicates exist