Fix memory corruption when reloading static leases