Fix #1361
Issue #1361: Add test