Is there poor contact in input signal circuit of the stop light switch?
Repair the poor contact.
Replace the TCM.