Fix small subtle bug in GROUP_BY constraint.

@guenter @krishnap

Commit message should be sufficiently descriptive.
If it happens to be `None`, then somebody effed up.  I don't like the idea of suppressing errors, but okay.