Resolved - i had made these pages by copying other pages that were part of the the CMS system. So the two 'require once' includes were landing in the middle of the other code, producing these unexpected results.
I could delete them, or move therm back to the top of the page and all is well.
Moral to the story - don't just willy-nilly create pages either from templates or a s a :"Save As" without knowing exactly what's in there first. I wasted 4-5 hours over this.