Optimize simple 'for' loops.

Can avoid a lot of block invocations in some cases, making things a
bit cheaper.