JCR-2668: NodeReferences are lost when deleting and setting the same reference in the same save() cycle