Unit test for issue #398.