add failing test case for #399
flag-based solution to #399 (17 new failures)
a more decent solution to #399 (5 new failures)
fix broken test. I think this actually makes more sense now
fix exception handling test cases. the output doesn't really matter
add failing test for #407
fix #407 by removing an optimization
Merge branch 'fix/399'