Undefined emitter fix

Updated nested loop counter name duplicate and checking if its defined. Reproduced with a bind using "once". Filtering should be introduced in the proper place and undefined check removed.