Issue #1849: Add a test
Fix #1849