Subdivided plane's faces have inconsistent indexes. How can I order them sequentially?

I'm trying to iterate through each face on a mesh sequentially.

This works fine with a grid (bpy.ops.mesh.primitive_plane_add(radius = 8)) and it loops through the faces row by row.

Subdividing a mesh though, the faces aren't numbered the same way.

Looping through the faces:

So it starts on the right, jumps all the way over to the left, completes the rest of the row, jumps to the beginning of the first row going in the other direction and then fills out the rest of the faces that same way. I guess on behalf of an algorithm.

How can I order them normally? The way a grid does?

.sort.faces() isn't doing anything. I may not be using it right, though

Blender offers a way to sort mesh elements, which you can find in the Mesh menu. This is available as bpy.ops.mesh.sort_elements in python.