Fix lock_many race condition

I put that there because without it, I was getting exceptions saying I needed to rollback.