code: function isSelfReference(ref, nodes) {
              let scope = ref.from;
  
              while (scope) {
                  if (nodes.indexOf(scope.block) >= 0) {
                      return true;
                  }
  
                  scope = scope.upper;
              }
  
              return false;
          }
docs: Determine if an identifier is referencing an enclosing function name.
  @param {Reference} ref - The reference to check.
  @param {ASTNode[]} nodes - The candidate function nodes.
  @returns {boolean} True if it's a self-reference, false if not.
  @private