This line is raising an exception in Travis on all platforms. There appear to be cases where we raise an exception before the mutex is locked, which causes an exception when we unlock the mutex in the `ensure` block.