[subset] Use gids_to_retain_sorted to produce old gid -> new gid mapping since it now has the more complete set.