Gittin 8:6-7
Gittin 8:6
There are 15 prohibited relationships who may simply remarry without yibum or chalitzah if their husbands die. If their co-wives go ahead and get married based on this exemption, and it is later discovered that the prohibited woman was congenitally infertile (meaning that the co-wife really did require yibum or chalitzah), the one who married is prohibited to both her husband and to the brother-in-law (with whom she should have performed yibum or chalitzah). All of the conditions described in mishna 8:5 apply to both men.
Gittin 8:7
Let’s say that a widow marries her brother-in-law (yibum) and her co-wife marries someone else, then it is subsequently discovered that the one who performed yibum was congenitally infertile (rendering the yibum ineffective). In such a case, the co-wife is prohibited to both her husband and to the brother-in-law (with whom she should have performed yibum or chalitzah) and all of the aforementioned conditions apply.