Remove closure in favor of a dedicated has_vertex function.