fix over-eager "switch back to master" behaviour