Add diagnostic code to oti indexing