Fix a 500 error caused by retrieving peer workflow after an integrity error when using repeatable-read