REMINDER: On December 1, 2018, this forum will be closed to new posts and responses. After that date, you will still be able to view and search the forum. New discussions should take place in the IBM Developer Answers forum.
The currentDocument.getDocument() has two different versions. The one I used - document1.getDocument(), which gets the in memory document without applying changes, and document1.getDocument(true), which applies the changes to the in memory document before retrieving it. Changing to the second version solved the problem.
Kudos to Tommy Valand over at the XPages development forum for solving this one.
Feedback response number WEBB8GBNFF created by Scott Blaylock on 04/27/2011