Added regression test for #1795