Add failing test for gh-4361
Don't assume that SyntaxTB is always called with a SyntaxError

Closes gh-4361
Merge pull request #4372 from takluyver/i4361

Don't assume that SyntaxTB is always called with a SyntaxError

closes #4361