More minor code cleanup.
Fix for pre-C++11 is_sorted().