Section 5. If a defendant brings money into court and offers it in satisfaction of the damages, the plaintiff shall in all cases recover the costs which had previously accrued.