Delay removing the thread key until after the last log message.