Avoid repeated suffix searches when settling a long transcript and defer boundary work until append/head checks need it. Fixes ranxianglei/billion-context#6839 (cherry picked from commit 43dfba5870)
43dfba5870