Add option to disable sorting for composite primitives.