I don't think we need to sort things here...the sorting is needed to ensure that we're computing the right hash each time, but by the time we get to storing stuff in the database the sorting of the actual payload doesn't matter. Or rather, it might be nice, but I think that's a separate issue.