for-each-ref: do not segv with %(HEAD) on an unborn branch