Ibn Abi al-Zinad (may Allah have mercy on him) narrates from his father, from the jurists of the people of Madinah, that a man who married a slave woman, after which she became separated from him by an irrevocable divorce, then her master took her as a concubine, and then her husband bought that slave woman: this slave woman will not become lawful for the husband through her master's taking her as a concubine, nor through her coming into his ownership, until she marries another husband.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الرجعة / 15205