add test for issue #45

Seems an earlier commit has actually solved this issue but I'm adding
this test to ensure there are no regressions.