Fix index crash when encountering a self-diag record.