CAROLINE-46: Fix deadlock in ThreadBundle destructor.