I use a for loop here because I want to break out of the loop when the target child is found, which is not possible using `Array.forEach()`.

Other opportunities for improved efficiency through better data structures abound in the Scope class. If possible, I'll tackle some of these when addressing your other suggestions.