MODE-2386 Fixed the behavior of the child with name iterator.

Strictly speaking, the "else" on 230 is completely unnecessary since line 229 is a `return` statement. Why not just keep line 228 as is and add a `last = null;` right after as a new line?