FIXED: bug in DOM's NamedNodeMap that meant .length could easily crash, or return incorrect values. Also added an Assert to NamedNodeMap.item: which is broken/unfixable, needs the class redesigning.