It turns out that our messaging system is a very evil thing when running multithreaded, which I've suspected for some time now. And because I've been assigned to get a particular multithreaded project to work in our client application which uses our ugly home-grown messaging everywhere, I now need to root it out and replace it with the appropriate Windows messaging mechanisms.
While I've been wanting to do this for a long time, I'm not convinced that this is really the week that I wanted to do it in.
*sigh*