Close node relationships in the DOM have always been problematic, because most interpretations of the DOM include whitespace text-nodes, which scripts don't usually care about.
It's right that they should be included, of course, because it's not up to implementations to decide whether this or that node is important. Nevertheless, whitespace text-nodes are usually not important, they just get in the way, complicating what should be simple relationships like firstChild and nextSibling ...