Use sorted-map in tests to deal with ordering issues

Passes the tests with profile 1.6 thus solving issue #116.