Not surprising. (But, great!) When in doubt, always look at the actual HTML that is coming out of the template ... not how your browser renders it. (This HTML was invalid, and browsers are never consistent as to how they handle errors.) There used to be a really good plug-in for Firefox that could subject any incoming HTML stream to an “HTML lint” to automatically detect invalid constructs coming back from the server. (It’s great fun to run that on a commercial website... not so much fun to run against your own.)