Fix the revision race check

With commit 62fabf3a65d the revision update was move to a place after the race
check. So we need to check for old_rev > new_rev now.