this function, calcDeepestOnscreen,  calculates the deepest onscreen nodes for the current firstOnscreen / lastOnscreen tree.

The other function, calcDeepestLastOnscreen, calculates the deepest onscreen nodes for the last firstOnscreen / lastOnscreen tree