Add unit test for issue #793.