Aren't the turn signal and stop lights bulbs two different bulbs on an XJ?
When you say turn signal stops flashing when brakes applied are you talking about the outside lights? or the dash indicator?
From my experience when this problem is exhibited from the dash indicators only, it is the turn / hazard switch in the steering column that is the most likely source of the problem.
Does the indicator on the dash stay illuminated and just stops flashing?
I'm still leaning towards a switch problem, hows the hazards working?