it's still possible (and it happens) that the change notification slips in between the two lines.
So, one solution is to make change notification asynchronous, so they only happen when we're not currently serving a request.
The basic gist would be to check in application.handleRequest and sleep the thread if we are currently dealing with change notifications.
Once all the notifications have been dealt with, we can go on with serving requests.
Change notifications would never be processed while we are serving a request.
I don't particularly like the above solution, but we need something, and I've got nothing better.
(hopefully we can remove it when we move to page based editing contexts)
Does anyone see any problems with the above idea?
Thanks,
-Dan