Add a test case for issue 18906

Closes issue #18906
Merge pull request #20207 from jroesch/issue-18906-testcase

Add a test case for issue 18906

Reviewed-by: alexcrichton