state: fixes LP #1391046

The godoc for state.mergeIds states they come from a map, and are then passed through a set, so there is no guarentee of ordering. Adjust the test to match reality.