Fix group_pairs/1 for empty lists.