If the fronts have 4mm left then it has to be tyre compound in my mind. I was going to say if the fronts were barely legal and the rears very nice, then that can cause enough variance in the sizes to give TC trouble, but with 4mm on it should still have enough to keep the RR close enough not to confuse it. I'd go with tyre composition.
Whatever it is, its given you enough of a shock to post on here and must have damaged your confidence, so same tyres all round will give you that back