fix Issue 10734 - Assertion failure: '0' on line 1546 in file 'cast.c'

It's a 2.064a regression introduced by 'improveDefArgs' change
commit: a711eb6b499ca85b7cfa4e758d9e968fef8d315f
Use Type::equals instead of pointer comparison