Add test for #3739