Add a test for #7671