From: sheldonlg on
sheldonlg wrote:

Here is another mystery. While waiting for a response I tried to work
on it by doing a getting of the pieces and putting them together. Since
the current file already had changes to attempt to fix the problem, I
went and copied the original into a test area to do some simple testing.
The first thing I did, of course, was to check that my test case was
larger than 4096 and that it showed 4096. It showed 5192 for the
length. Now this file was a copy from the same place that the one with
a problem was copied from.

So, I copied this copy to replace the one with the problem and, lo and
behold, the problem disappeared.

Thanks for your responses. If the problem reappears, I will try
normalizeDocument (before replacing it again :-) if I have to). I
didn't this time because I didn't see you responses until after I
"fixed" it on my own.