Fix #129: updating groups after filterFunction.

A serious bug was introduced in version 1.3.8, causing groups on the
first dimension to be incorrectly calculated after a filterFunction was
called on another dimension.
Add support for more than 32 dimensions.