expandTypeSynonyms before comparing types