checkout: restrict @-expansions when finding branch