[CREATE] and [CLOSE] are fired as a result of HSHELL_WINDOWCREATED and HSHELL_WINDOWDESTROYED via SetWindowsHookEx, so if they are firing incorrectly whereas they used to fire correctly something else is messing with you.

The Window Exists conditional could potentially return false for a hung window if windows no longer lists it in the EnumProcesses function. In short I'm not entirely sure what is causing your issues.