syntax: Fix span on illegal ABI errors

Fixes #8537
Fixes #14499