resolve problems where loop counters i,l were not properly scoped
resolve legacy problems where loop counters i,l were not properly scoped