If, after the defendant moves from property in compliance with an order or agreement for possession or in reasonable contemplation of its taking by the plaintiff, the proceeding is dismissed with regard to that property for any reason or there is a final judgment that the plaintiff cannot acquire that property, the court shall:
(a) Order the plaintiff to deliver possession of the property to the persons entitled to it; and
(b) Make such provision as shall be just for the payment of all damages proximately caused by the proceeding and its dismissal as to that property.
(Added by Stats. 1975, Ch. 1275.)