3.1: Fix group counting off-by-one bug.