Yosef Karo, Shulchan Aruch — Even ha-Ezer 15
“ If he had a sexual relationship with his wife’s sister outside of marriage, and his wife and brother-in-law later died, there are those who say he would be prohibited from marrying his wife’s sister because just as the woman is prohibited to her husband, so too is she prohibited to the man she had an affair with, notwithstanding the fact that she was anyway prohibited to him. ”
