Added primitive to recover the index from an invalid state, for example after a crash during analysis.