Packages: fixed overzealous deduplication of packages that removed essential and group packages