Restoring correct check for legacy PKEY