Thanks for the help everyone, it's much appreciated. I found the problem. Unfortunately it lay on my side of the keyboard - I was editing the wrong html file. I may never have noticed without your helpful debugging advice. Still... days wasted to my idiocy.
Anyway, the ebook is completed and passed the checks. Thank goodness.