Attribute attribute = attributes.get(key);
Object oldVal = get(key);
// fire InsteadPutHandler (if present) or perform normal processing
if (handlers.hasHandler(InsteadPutHandler.class, key)) {
final AttrChangeEvent attrChangeEvent = new AttrChangeEvent(oldVal, value, key, this);
handlers.invokeInsteadPut(attrChangeEvent, key);
} else {
String newXmlVal = getTypeMapper().toXml(value, attribute.getXmlType());
Node node = resolveAttribute(attribute);
attribute.reset(); // reset so next fetch will re-resolve