Prevent unrolling of non-nested loops

Otherwise, some loop nests with constant bounds are fully unrolled,
which leads to code burst.

As a side effect, remove useless ``if 1:`` in generated code.