Better line tracking for throwSyntaxError

`throwSyntaxError` wasn't following the original location. Now it checks for the `sm_` variants first.