Compiler/expand: redo the loop, not the if block

I've not yet been able to verify with the test suite that this changes
anything.
Compiler/expand: remove an unnecessary recursive call