Discard matching types when restricting a union with another one