Fix optimistic locking failure not thrown