You don't need to revert to a pre-HTML5 DOCTYPE: you simply need to explicitly include an <html> tag (which is optional in HTML, and should be inferred if not included, but appears to be required by Dreamweaver when it's determining what is code outside of the <html> element).
So this works:
Your XHTML1.0 version worked because your XHTML boilerplate included an <html> tag.
Thank you for posting this, by the way. We were struggling with the same problem, and your mention of it working in XHTML1.0 was enough of a hint to help us to solve it.