Adapted test assertion against yaml dump

Fixes #12914 (again).