Ticket graph connection finding/handling patch

The original way the ticket links were finded and handled has a flaw. If 
a ticket was reached first in a 'longer' path/way than the shortes way 
from the root ticket, it got a bigger CurrentDepth as it should be. Later 
this ticket were skipped because it was 'already seen' but the 
CurrentDepth were not checked.

To handle connections and CurrentDepth correctly, the whole algorithm 
should be rewriten from depth-first to child-first search.