Workaround for MDBG thread exit bug