testsuite: Add testcase for #16394