Add a test case for issue 18906

Closes issue #18906