Tips to cope with scoping rules of top level `for` loops etc