Correctly implements isSynonymOf