Set the sorted flag back to false if an inplace sort is performed