Fixing an error in homemade remove_if algorithms.