Changed implementation of get-guard-trace

This function now searches for a guard trace by following a path through the trace tree.
Previously, the guard trace was searched for by looking for the correct child of the trace currently at the top of the execution stack, but  this approach doesn't work anymore because mp-tail traces are also included in this stack, while they can't have any child traces.