Add test for #10618 and #16382

Closes #10618
Closes #16382