Index regeneration crashes if index folder isn't removed