It's fairly unlikely to be a master cylinder fault, more likely to be wiring related..........however what about having the fault codes read correctly, and perhaps with a view to looking at live data from each of the four wheels while underway?
It is sometimes easier and cheaper than guesswork
Brian