The keys should be sorted.