Issue #25677: Merge SyntaxError caret positioning from 3.5