A couple teams recently reported an issue where their script host hung due to deadlocks. Since jscript.dll was in the call stack for the hung thread it didn't take long for the bug to wind up in our lap, since CPX also sustains Windows Script.
The problem was that as one thread was exiting and DLL_THREAD_DETACH was passed to the DllMain ...