This is less about improved type checking than enabling a subsequent change to the representation of labels. Backports commit bec1631100323fac0900aea71043d5c4e22fc2fa from qemu