if (appended != null && appended.hasChild(persistent.getKey())) {
// the same node has been both removed and appended => reordered at the end
ChildReference appendedChildRef = node.getChildReferences(this).getChild(persistent.getKey());
newPath = pathFactory().create(sessionPaths.getPath(node), appendedChildRef.getSegment());
Path oldPath = workspacePaths.getPath(persistent);
changes.nodeReordered(persistent.getKey(), primaryType, mixinTypes, node.getKey(), newPath,
oldPath, null, queryable);
}
}
}