Re-land "[PDB] Avoid calling discoverTypeIndices for a known record kind"