Makes firstTwoGroups method safer if there are broken groups or something.