Fix bug in prevention against concurrent retries (JAVA-449).