mesh: Fix segmentation fault by repeating MESH_GROUP_ADD/REMOVE