Just filed a bug report with Sitecore Support. In case you are out there searching Google for the same exception, here’s the issue. This is Sitecore 6.4.1 rev. 110720.
One of my developers accidentally applied Layout Details to a template, instead of its Standard Values. This used to work, even though it is not a best practice. When opening items based on the template, most of the time he would get the error below. This seems to be due to WebEditRibbon.ConvertToJson not finding the Layout Details on the template, then calling the wrong method on XmlDocument (Load instead of LoadXml).
The solution is simply to apply the layout details to the Standard Values, instead of the Template itself.