Debug thread_mutex runtime checks