Add test-case for #8172

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>