various adjustments and fixes to index corruption detection