[python] Converting a list to a set changes element order