Add regression test for Issue 19811.

Fix #19811.
Merge pull request #19977 from pnkfelix/add-test-for-issue-19811

Add regression test for Issue 19811.

Reviewed-by: japaric