Another attempted fix at the sorting iterator for C++11