Use sorted result for comparison.