Simplifying replaceNodeInProperties.