Fix crash in ThreadPool::Stop

fixes #8059