Use array_merge_recursive in group merge. Fix tests.