Cannot insert a node of this type at this location. Error while using compare

Hello, while doing compare between two specific pages of a document i get: java.lang.IllegalArgumentException: Cannot insert a node of this type at this location.

Code snippet to reproduce this:

Document oldFull = new Document("path/to/oldVersion.docx");
Document modFull = new Document("path/to/modVersion.docx");

Document org = oldFull.extractPages(1, 1);
Document mod = modFull.extractPages(0, 1);

//org.save("org.pdf");
org.compare(mod, "any", new Date());

What is interesting, if you uncomment org.save(“org.pdf”); everything works as expected and there’s no exception.
oldVersion.docx (28.4 KB)

modVersion.docx (23.8 KB)

@dfinsolutions
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27605

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-27605) have been fixed in this Aspose.Words for Java 24.12 update.