aggregate(), fix merge() needed positions indexed by keys to update groups and remove from groups