Backported fix from irma_card fixes #25