code: func (v Variable) Resolve(env Environ) (string, Variable) {
  	name := ""
  	for i := 0; i < maxNameRefDepth; i++ {
  		if v.Kind != NameRef {
  			return name, v
  		}
  		name = v.Str // keep name for the next iteration
  		v = env.Get(name)
  	}
  	return name, Variable{}
  }
docs: // Resolve follows a number of nameref variables, returning the last reference
  // name that was followed and the variable that it points to.