bug #3975 Table grouping isn't implemented properly