fix order of node detachment from HTMLL-based fragments (see #391)