void addMapChanges(PropertyMapImpl propertyMap, ConstMap mapChanges) {
    HashMap map = (HashMap) changes.get(propertyMap);

    if (map == null) {
      map = new HashMap();
      changes.put(propertyMap, map);
    }

    for (ConstMapIterator iterator = mapChanges.constIterator(); iterator.atEntry(); iterator.next()) {
      ValueChange vc = (ValueChange) iterator.getValue();
      Object key = iterator.getKey();
      Object newValue = vc.getNewValue() == null ?
                        null : ((PropertyValue) vc.getNewValue()).getWithDefault(propertyMap);
      Object value = map.get(key);
      Object oldValue = value == null ?
                        vc.getOldValue() == null ?
                        null : ((PropertyValue) vc.getOldValue()).getWithDefault(propertyMap) :
                        ((ValueChange) value).getOldValue();

      if (!Utils.equals(oldValue, newValue))
        map.put(iterator.getKey(), new ValueChange(oldValue, newValue));
      else if (value != null)
        map.remove(key);
    }
  }