1) Fix an issue with non-deterministic iteration order in phi_translate