Add stacktrace to ParseError

Fixes #854. Also clean up the parse error test a little, while adding a .stack check.
Seems that it only blows up when I execute that code, switch from IE 11 mode to IE 10 (or vice versa) and execute it again.