code: Optional<Expression> compileAvoidingDetaches(ExprNode node) {
      checkNotNull(node);
      return new CompilerVisitor(variables, varManager, exprCompiler, null).exec(node);
    }
docs: Compiles the given expression tree to a sequence of bytecode in the current method visitor.
  
  <p>If successful, the generated bytecode will resolve to a {@link SoyValueProvider} if it can
  be done without introducing any detach operations. This is intended for situations where we
  need to model the expression as a SoyValueProvider to satisfy a contract (e.g. let nodes and
  params), but we also want to preserve any laziness. So boxing is fine, but detaches are not.