Remove flakiness from dict keys by introducing OrderedDict