code: function (id, before) {
              var defaultScopeOrder = this._defaults.scopeOrder,
                  index = _.findIndex(defaultScopeOrder, function (id) {
                      return id === before;
                  });
              if (index > -1) {
                  defaultScopeOrder.splice(index, 0, id);
              } else {
                  // error
                  throw new Error("Internal error: scope " + before + " should be in the scope order");
              }
  
          }
docs: @private
  
  Adds the scope before the scope specified by before argument.  This
  function must never be called directly. Use addScope to add scopes to
  PreferencesSystem, including from within its implementation.
  
  @param {string} id Id of the scope to add
  @param {string} before Id of the scope to add it before