Merging documents causes custom xml doubling

I'm trying to merge complex document with altChunk inside into single document. Main document has custom xml file embedded into it. After running the merge procedure as following:
I get two custom xml files with identical content. Is it a bug or somewhere defined behaviour?
- Code: Select all
wordMLPackage = WordprocessingMLPackage.load(new java.io.File(outputfilepath));
wordMLPackage = ProcessAltChunk.process(wordMLPackage);
SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
saver.save(finaloutpath);
I get two custom xml files with identical content. Is it a bug or somewhere defined behaviour?