MAP-646:  Fixed error in group numbering, added validation check