title: Razor: Why is my variable not in scope
body: <pre><code>@inherits umbraco.MacroEngines.DynamicNodeContext
  @using System.Collections;
  
  @{ List&lt;string&gt; qa = new List&lt;string&gt;(); } //this is not defined in the recursive helper below
  
  @helper traverseFirst(dynamic node){
     var items = node.Children.Where("umbracoNaviHide != true");
     foreach (var item in items) {
       foreach(var subItem in item.Descendants()) {
          if(subItem.Id == Model.Id)
          {
             qa.Add();
             break;
          }
       }
       @traverseFirst(item)
     }
  }
  
  @traverseFirst(@Model.AncestorOrSelf("Book"))
  </code></pre>
  
  <p>The variable qa canot be accessed in the recursive helper. Is there a way around this?</p>