Optimized method call order.

This cuts the number of recursive calls on the stack in half, making a
StackOverflowError less likely to occur. From an optimization
perspective I should re-write the whole thing as a loop, but that code
would be MUCH less readable.