check for duplicate names in mutually recursive type definitions