merge iterator should only be allocated when required