Deduplicate lambdas in CourseAssigner.