Add regression test for issue 2738.