Fix testsuite failure caused by fix to #8041