Fix a typechecker bug which caused type class dictionaries to not be inserted in a particular case