Fix #1795
Issue #1795: Add test
Fix test broken by recent typechecker change (ceylon/ceylon-spec@82044b69e4653f6f595c85f240c2be24452bd96b).