more work on VertexQueryOptimizer.... weird issue around bothE (needs to be a FlatMap...doh.)