private Set<Expression<?>> visitJoins(Iterable<JoinExpression> joins, Set<Expression<?>> known) {
        for (JoinExpression j : joins) {
            final Expression<?> expr = j.getTarget();
            if (expr instanceof Path && ((Path) expr).getMetadata().isRoot()) {
                known = add(known, expr);
            } else {
                known = expr.accept(this, known);
            }
            if (j.getCondition() != null) {
                known = j.getCondition().accept(this, known);
            }
        }
        return known;
    }
{@code ValidatingVisitor} visits expressions and ensures that only known path instances are used

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/types/ValidatingVisitor.java