Fix check for illegal PMIDs