Because the the vertex group name-to-index map is stored in the object
rather than object data, the object info node has to also replace the
map when it replaces the mesh component on the geometry set.
This normally works fine as a way to use the vertex groups from the
input mesh, but when passing this mesh to the next modifier, the entire
mesh component is replaced, and the vertex group name map is lost.
Normally I'm not sure I would go to this length to make up for very
weird code architecture, but the changes in DerivedMesh.c actually
seem pretty reasonable to me. Rather than assuming the vertex groups
are for the original object and replacing the map for every modifier,
we only replace the mesh data in the mesh component.
On the other hand, I'm not so happy with the idea of exposing a
replace_mesh function just for the geometry component. Maybe that
behavior could be exposed a bit differently.
I looked into moving the vertex group name list to object data, but I
think I should only have one large refactor patch in review at a time.