Sry for the trouble folks. This is actually documented:
one solution is to predeclare the loop variable :

    tpl<int,int> i_pair;
    //4. for both the right and the left spike, get the biggest set.
    foreach (i_pair, l_listLeftLines)
    {  
       ...
    }

best regards, Oliver