Make index flush safer