It is basically the same problem as #8836. In the Node AST, the s1 and s2 identifiers within the call site are replaced with references to the s1 and s2 variable declarations, respectively, so we lose line number information for them. The errors are emitted at line 10 because that's the last line where we do have line number information.
@griesemer is looking into a long-term revamp of the front end code. That will address this. I don't think it's worth worrying about before then. Even if the line number is off a little, the error is very clear about the location.