LockException may still be thrown by `UnitOfWork::lock()`, so one of these lines should remain.