Phil,
Justed tested it and got the same results. This has to do with the fact that the document gets recalculated when it's saved (even when computeWithForm is set to "onload"). I've seen the same behavior in the past (before the XPage era) and it's probably by design.
If you add a (hidden) input field on your XPage (bound to the ID field) the value calculated during the onload is saved correctly.
Mark