Fix memory initialisation in subgroups tests