Fix for group vs group within group collisions (fixes #877)