Add a regression test for the original test case that alerted to the problems in #33.  It passes with the new changes in the branch.