U4-5301 - fix AppendDocumentXml + nodes sorting