Re-order to restore for 1..1000 {} optimization.

More inlining possibilities led to 1..1000 style things being turned
into code no longer recognized as a loop over a range, so we lost the
optimization. Move it to before any inlining attempts are made.
timotimo++ for spotting this optimization regression.