title: Why does concurrent flattener returns only 2 inner most children
body: <p>I can't figure out why this tree 'flattener' is returning only innermost children, the expectation is that it should return flattened tree.</p>
  
  <pre><code>var x = {
    "Fields": {
      "Id": "1",
      "MasterAccountId": "",
      "ParentAccountId": "",
      "Name": "Name 1"
    },
    "Children": [{
      "Fields": {
        "Id": "2",
        "MasterAccountId": "1",
        "ParentAccountId": "1",
        "Name": "Name 2"
      },
      "Children": [{
        "Fields": {
          "Id": "5",
          "MasterAccountId": "1",
          "ParentAccountId": "2",
          "Name": "Name 5"
        },
        "Children": [{
          "Fields": {
            "Id": "6",
            "MasterAccountId": "1",
            "ParentAccountId": "5",
            "Name": "Name 6"
          }
        }, {
          "Fields": {
            "Id": "7",
            "MasterAccountId": "1",
            "ParentAccountId": "5",
            "Name": "Name 7"
          }
        }]
      }]
    }]
  }
  
    function recurs(n) {
      console.log(n.Fields.Name);
      return (n.Children != undefined ? $.map(n.Children, recurs) : n);
    }
  
  var r = recurs(x);
  </code></pre>
  
  <p>It returns elements with id 6, 7, while console.logs all 5 of them.</p>
  
  <p><a href="http://plnkr.co/edit/LdHiR86EDBnZFAh6aAlG?p=preview" rel="nofollow">http://plnkr.co/edit/LdHiR86EDBnZFAh6aAlG?p=preview</a></p>