I believe that a UA crew can only "go illegal" (expire due to excessive time on the clock) when the plane's door is open.
Thus, if delays happen, and the crew exceeds the max duty time, they don't really go illegal until the door opens again.
Of course, in your case, if the crew really was long when the mechanical occurred, and the door opened for the mechanic, THEN they could expire.
All of this comes from my aging memory, so it probably has some flaws.