If an injunction to stay proceedings after verdict or judgment in an action for the recovery of real estate, or the possession thereof, be dissolved, the damages assessed against the party obtaining the injunction, shall include the reasonable rents and profits of the lands recovered, and all waste committed after granting injunction.