After some more investigation I have discovered that the bug only affects instances of NSPanel which have their 'hide on deactivated' attribute disabled.
Can anyone think of a way that I can reset WindowServer to the state it should be in just after a fresh install? I.e. does it keep some data/preferences somewhere on the filesystem that I can trash?