RavenDB-1490 - Fix loop exit after a concurrency exception