Add test for #6579