Where is the loop coming from? I don't see firstChildType being used after this line either.