Fix #1746
Issue #1746: Add a test