Add test case for #9046

Signed-off-by: Austin Seipp <austin@well-typed.com>