FORUM PLAN UPDATE: Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.
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