We discovered in the process of fiddling about that turning the taps on downstairs takes all the water from the mains and is a crude but effective way of stopping the flow to the overflowing tank. We couldn't find the stopcock to turn the mains off so we spent the night with the downstairs taps turned full on.
If we hadn't the water might have come over the top of the tank and down into our bedroom beneath.