In emacs 23.3, I tried to build a minimal test case that would exhibit some of the problems cited here, and failed. What I wrote is below, and loading it with `emacs -Q -l test.el' seems to produce the expected results. If there *is* a real problem, it seems to me, some simple variation on this code should show it.