Add a few regression tests

These cover some recent fixed issues that didn't come with tests.