function canRemoveNonRenderingNode(node) {
    if (allReferences.has(node.attributes.id)) {
      return false;
    }
    for (const child of node.children) {
      if (child.type === 'element' && !canRemoveNonRenderingNode(child)) {
        return false;
      }
    }
    return true;
  }
Nodes can't be removed if they or any of their children have an id attribute that is referenced.
@param {import('../lib/types.js').XastElement} node
@returns boolean