Handle cases where current vertex disappears (fixes #2234)