Improve the heuristic for truncating the traceback