pan/midgard: Move midgard_is_branch_unit to helpers