Fix test_naming tests that were not resilient to list ordering.