Issue #1736: Add a test
Fix #1736.