Testsuite: add test for #10781