tests: Add regression test for issue #31