Don't call query.one() twice during traversal