Fix serialization being order-dependent.