search: Find correct Zoekt branch
Created by: tsenart
This commit fixes the search code to always find the correct Zoekt branch rather than assuming HEAD is in the first position, which is no longer true since https://github.com/sourcegraph/zoekt/commit/321d522863006f83e0bc0c8a86af3b009a2c826d
Test plan
Existing tests.