When BitstreamWriter::EmitRecordWithAbbrevImpl is used to write a blob, but the blob data is provided in the Vals array argument instead of the Blob argument, it triggers an assertion failure. This happens because RecordIdx isn't updated correctly, so it looks like there are still unemitted values left in the Vals array. We fix this by updating RecordIdx to reflect the fact that everything in Vals has been emitted.
(LLVM currently always provides blob data in the Blob argument, so it can't trigger this bug as-is.)