Issue #1740: Add a test.
Fix #1740.