Where it is made to appear to the court that -
(a) one wrongdoer in whose favour judgment is given is or may become a bankrupt, or
(b) the estate of one wrongdoer for the benefit of which judgment is given is or may be insolvent,
provision shall be made to ensure that such first-mentioned wrongdoer or such estate, as the case may be, shall be deprived of recovery to the extent that the wrongdoer or estate is liable to another party or in the aggregate to other parties as a result of the same accident, occurrence or transaction; and for that purpose judgment in favour of the wrongdoer or for the benefit of the estate shall, where necessary, be attached in whole or in part for the benefit of another party in whose favour judgment is given.