More sophisticated stacktrace adjustment.