Cleanup similar code in triggered_mandatory_questions and triggered_requirements