These marriages were illegal, under Civil Law, from 1835 until the Marriage (Prohibited Degrees of Relationship) Acts, 1907 and 1921, that is the Deceased Wife's Sister Marriage Act, 1907 and the Deceased Brother's Widow's Marriage Act, 1921.
However many couples ignored the law, and many clergy overlooked it. In fact there were petitions from clergymen who implored that a Bill might be passed, since many of their parishioners had already married their sisters-in-law, under the belief that this was the best thing for the children, and of course it was the best thing for the children. However as late as 1949 a Marriage Act was passed that, among other provisions, prohibited marriage between a man and his divorced wife's sister.
Stan