fixed composition bugs in iter and enum

Composition was not functioning correctly. The fix involved passing inner
enumerators as a function instead of an object; the object reference is
retrieved from the outer iterator.