Make the groups token test more reliable.
#1344