Fix bugs related to branch selection in subedit windows