Move stack trace filtering to FailureTree class