Preserve iterator state on getSize