Fix `remove-vertices'` for weighted undirected graphs