See https://discourse.phabricator-community.org/t/bug-in-src-parser-html-phutildomnode-php/2882/.
The behavior of selectChildrenWithTags(...) currently isn't well-covered by tests and isn't quite right. Add coverage and fix it up.
Particularly, there's a bad call to a nonexistent method, and when we convert a tag that doesn't match the selection set into content, we incorrectly discard any paired closing tag.