Add a flag to disable clever references sorting.