Redid addition of better handling of group names during concatenation.