Added test for #1036
Fixed test for #1042
Fixed other tests that failed because of fix for #1042
Fixed #1042 contravariant types and Nothing