code: function(index) {
      var result = _.extend({}, index.nodes);
      _.each(index.scopes, function(child, name) {
        if (name !== "nodes") {
          _.extend(result, _collect(child));
        }
      });
      return result;
    }
docs: Accumulates all indexed children of the given (sub-)index