Problem:
The builder has duplicated pending-anchor and branch-destination selection logic in multiple flow construction paths. That makes follow-up bug fixes harder to review because each fix also has to touch duplicated control-flow plumbing.
Expected:
Shared anchor selection logic should live in small helpers, with no behavior change.
Impact:
The current duplication increases review risk for future anchor and branch-handler fixes.
Proposed fix:
Extract helpers for branch destination anchor selection and pending-flow anchor precedence.
Problem:
The builder has duplicated pending-anchor and branch-destination selection logic in multiple flow construction paths. That makes follow-up bug fixes harder to review because each fix also has to touch duplicated control-flow plumbing.
Expected:
Shared anchor selection logic should live in small helpers, with no behavior change.
Impact:
The current duplication increases review risk for future anchor and branch-handler fixes.
Proposed fix:
Extract helpers for branch destination anchor selection and pending-flow anchor precedence.