Yes, that seems to have been the problem. I have a mixer tap on the bathroom sink and I was able to force cold water into the hot side by blocking the tap. I will have to look at the shower pump and see if I can do anything to avoid the problem in future, but for now I am sorted. Thanks very much.