Fix a race-condition in Msg_Thread::run, Msg_Thread::put .