Improved syntax error message, fixes #281