Move distinct earlier.