If we assume the pilot’s medical certificate had expired, the outcome is that the pilot was not lawfully permitted to exercise the privileges of his licence. That’s not the same as the pilot’s licence being invalid.
Nor is it the same as the pilot being medically unfit. Are you saying, JM, that the expiry of a medical certificae automatically results in the certificate holder being unfit?