Bug 963295 - Fix group merging

Fixes bug 963295