fix grouping when three groups have three different common ids
Merge pull request #1242 from ORCID/fixCommonIdsOver3Groups

fix grouping when three groups have three different common ids