Put the buttons into groups. Re #6160.