Fix an issue with the findNodeByContent function of the TreeController.

The optional comparison function was called just once because it was
not passed during the iteration.