Fix sorting for header canonicalization.