When a judgment or decree is vacated or set aside, in whole or in part, pursuant to this Act [sections
501 to
515 and
516 to
596 of this Appendix], the court may also set aside or vacate, as the case may be, the judgment or decree as to a surety, guarantor, endorser, accommodation maker, comaker, or other person who is or may be primarily or secondarily liable on the contract or liability for the enforcement of the judgment or decree.