isSymbolInstance function
handle is a root-level instance whose definition carries a
SymbolComponent (D7's rule, F-11's for a symbol).
Implementation
bool isSymbolInstance(DraftDocument doc, Handle handle) {
final node = doc.tree[handle];
return node is InstanceNode &&
node.parent == doc.rootHandle &&
doc.tree.definition(node.definition) != null &&
doc.components.get<SymbolComponent>(node.definition) != null;
}