testsuite: Add test for #16514