Fix bad logic in regressiontest branch selection