Allow more flexibility in iteration order in tests