dotto: fixed various edge-case crashed found by type checker
dotto: fixed various edge-case crashed found by type checker

scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris,scalaris-team/scalaris