getGroups() $limit was not handled correctly