Cleanup default branch handling

Change-Id: If55785e0556bf47b233350171f912b6249f4926f