A defendant, any person entitled to file a petition under the provisions of section forty-one of this article, any party to any bond given under section twenty of this article, any officer who may be liable to the plaintiff by reason of any such bond being adjudged bad, or any other person whose rights are affected by the attachment, shall have the right, either jointly or separately, to defend against any attachment, and to the benefit of all available defenses thereto: Provided, That a judgment in favor of any party to a bond, or in favor of an officer who may be liable by reason of such bond being adjudged bad, shall not discharge the lien of the attachment on any property.