Ah, I see. Thanks for pointing that out.
I thought that it would return the order in which the elements of Z_29 were found; it seemed to on tests.
I was interested in the order in which the elements were found, using exponents in ascending order.
I naively thought this approach would do just that, and eliminate duplicate elements.