Generate the master schedule with one teacher listed as a resource for the course. Then manually change the teacher on the necessary terms.

OR

Generate the master schedule for each term separately with the appropriate teacher listed as a resource on the course record.