Sort keys in state dump