last_vertex_id_ is signed, so have to check <= 0