More work on bug #7909.
This fixes #7918.  Clear data no longer resets the group.
This fixes #7917.  The devices table now passes the group on.
This fixes #7919.  I added a parameter to select().
More work on bug #7917.  This time I think it is properly fixed.