Add test for #16465

Closes #16564