Unvented cylinders have two thermostats, one for normal operation and another one which opens when overheated, typically non-resettable, which will cut power to the valve and prevent water flowing.So if the thermostat in the cylinder fails its still no help.
The valve is what switches the boiler, so normally the valve closing also stops the boiler.
If the boiler continued to heat when not requested due to some other fault, the valve would still be closed, and the result is the boiler overheating and switching off, as the boiler will have some means of detecting overheating.