Section 31. If a savings bank is charged as trustee, and the court finds that the answer creates a doubt as to the identity of the defendant, it may require the plaintiff to give bond, with surety approved by the court, conditioned to indemnify such bank from any loss by reason of payment by it pursuant to the court's order.