`def_nr` is decremented twice, this results in shuffling of vgroupdata. `remove_from_vertex_group` should only deal with weights and not tweak `def_nr` as defgroup name index is updated in `remove_defgroup_index` after deletion of selected vgroup. So just remove the code from `remove_from_vertex_group`. Pull Request: https://projects.blender.org/blender/blender/pulls/134015