Ensure Enum.to_list and Dict.to_list return exactly the same result