Revert to a non-range based for

This should allow to compile Lima with a gcc before version 4.6.