Added test for #1242
Fixed tests for #1242
Fixed #1242 variance-related bug with qualified types