If the property has been delivered to the plaintiff, and judgment rendered against him, on demurrer, or if he otherwise fail to prosecute his action to final judgment, the court shall, on application of the defendant or his attorney, proceed to inquire into the right of property, and right of possession of the defendant to the property taken.
R.L. 1910, § 4806.