[Truffle] Fix depth detection in unresolved dispatch.

We used to detect the depth of a dispatch chain by counting the number
of parents between the node and the DispatchHeadNode. That no longer
works now we are using the DSL for dispatch nodes, as they form their
own chain. This was causing megamorphic dispatch to be created either
too early or not at all, as the correct depth was either hit too early
or jumped over entirely.

This patch maintains depth manually.