This should fix the deadlock with mock object destructors.