Fix assumption of dicts having order