Sort the keys in the uid/name lookup when serializing so that the order
doesn't change randomly every time...