Does anyone have any thoughts on this?
Technically we should also be setting _NET_WM_STATE_FOCUSED for focused windows and removing that atom when the windowe loses focus (this is a recent revision to EWMH; it didn't exist when EWMHDesktops was originally written). It would be interesting to see if doing so fixes any of the other occasional odd behaviors that get reported.