Add more tests

I had hoped one of these would catch #9 with a simpler testcase, but apparently
not. Might as well add them anyway.