Bechorot 16 - Saving Offspring of Redeemed Animals
If a consecrated animal became blemished and was redeemed , its offspring are forbidden. Of course, if the animal gave birth after redemption, its offspring is completely permitted, but here it was pregnant when it was redeemed. What can you now do with the offspring? We cannot bring it as a sacrifice, since it was born from a mother that was a disqualified and therefore rejected sacrifice. Neither can we redeem it, because the offspring never became a sacrifice. Therefore, said Rav Huna, they have to be locked in a room and left to die. However, in Israel they said that one should sanctify the fetus before birth, to be the same sacrifice type as its mother, and then the redemption of its mother won't affect it and it will be a fit sacrifice.
If one accepts animals from an idolater as fixed-income investment, that is, they will share in the offspring, but he promises to later return the fixed sum, the cost of the animals at the start of the deal - the animals are exempt from the laws of firstborn, because the idolater has a lien on them and can claim them in lieu of payment.
Art: John Frederick Herring, Jnr. - Animals In A Farm Yard