code: func (ref Ref) OutputVars() VarSet {
  	vis := NewVarVisitor().WithParams(VarVisitorParams{SkipRefHead: true})
  	Walk(vis, ref)
  	return vis.Vars()
  }
docs: // OutputVars returns a VarSet containing variables that would be bound by evaluating
  //  this expression in isolation.