Fix small subtle bug in GROUP_BY constraint.