Make inspector more reliable inside malformed HTML.