What did the stop light switch have to do with the said indicators coming on unnecessarily?
The VSC/ABS CPU needs to know that the brake pedal has been pressed by the switch. The master cylinder pressure switch is also monitored for the voltage change that tells the CPU what is the force on the brake pedal. If there is no or erratic signal from the stop switch but the master cylinder pressure switch shows a change, it sets error code C1246. If changing the stop switch does not clear the code, then the fault is in the master cylinder itself.