Add test for #6769