Added some changes to make recovering from a corrupt index or corrupt spatial index more robust