@Override
  public void addValue(int inputId, Value value) {
    //TODO RC: should we check inputId > 0 here? Storage format assumes positive ids, and it's better
    //         to check this (and fail) as early as possible
    Object fileSetObject = getFileSetObject(value);

    ensureInputIdIsntAssociatedWithAnotherValue(inputId, value, false);

    if (fileSetObject == null) {
      attachFileSetForNewValue(value, inputId);
    }
    else if (fileSetObject instanceof Integer) {
      int existingValue = ((Integer)fileSetObject).intValue();
      if (existingValue != inputId) {
        ChangeBufferingList list = new ChangeBufferingList();
        list.add(existingValue);
        list.add(inputId);
        resetFileSetForValue(value, list);
      }
    }
    else {
      ((ChangeBufferingList)fileSetObject).add(inputId);
    }
  }
@Override
  public void addValue(int inputId, Value value)