for (let {parent} = this; parent != null; parent = parent.parent) {
      if (parent instanceof ancestorConstructor) {
        return parent;
      }
    }
Returns the first parent FbtNode that is an instance of the given class.