Fix the new code's sorting functionality to work also for InParanoid.