Added regression test for 865