adjusted ArrayIterator internals for parity with php zend.