6d0ef1cf57
This code iterates over the items in a vector, and if one case is met, it mutates that same vector. This invalidates the object, as the place where that object used to be has been moved.