Bugfix vertex/upsert! and add unit test for the failing case.