expandTypeSynonyms before comparing types

Fix for #79