Support aliases for numeric branches. Fixes #3461

The issue seems to be that aliased branches were checked for `dev-` prefix, where numeric branches are named with `-dev` as a suffix instead.