Add a test for #7299