Trying to fix deadlock with mock object destructors on Mac.