And you're incorrect
Assuming that the instructor is receiving compensation, the FAA considers time spent acting as a flight instructor under parts 61 and 141 to be other commercial flying under part 135. Legal Interpretation 1990-32 (Oct. 31, 1990).
Besides 117 is the wrong reg as those are rest rules and not cumulative flight times per month/quarter/calendar year.