In an action on a contract, if the defendant pleads that another person ought to have been jointly sued and issue is joined thereon, and it appears on the trial that the action was barred by the provisions hereof against such person, the issue shall be found for the plaintiff.
14 M.R.S. § 862