Make group/ungroup work for single edges