Optimize case when SequenceIterator is wrapped in a PHP iterator