See #17798
return 0;
    }
    const existingID = pendingStringTable.get(str);
    if (existingID !== undefined) {
      return existingID;
    }
    const stringID = pendingStringTable.size + 1;
    pendingStringTable.set(str, stringID);
    
    
    
    pendingStringTableLength += str.length + 1;
    return stringID;
  }
  let currentlyInspectedElementID: number | null = null;
  let currentlyInspectedPaths: Object = {};
  
  
  function mergeInspectedPaths(path: Array<string | number>) {
    let current = currentlyInspectedPaths;
    path.forEach(key => {
      if (!current[key]) {