deduplicate subgem lists