I'm suspecting unbound nodes can have the owner document destroyed, e.g.
my LibXML::Document $doc .= new;
my LibXML::Element $elem = $doc.createElement: 'root';
$doc = Nil;
# sometime later
$elem.doc.root = $elem;
The problem (I think), is that there's nothing currently keeping the document alive, if it's not explicitly referenced.