Correct logic for detecting the gerrit version