Since we're going in order, just create this node right next to `custom4` above and append it when done with that type. Then you shouldn't need to keep looking for it on each iteration.