Fix possible crash when validating quality requirements.