Make more safe usage of _lastVertex.