Excluding the refund, the heavy-equipment maker incurred $400 million in tariff expenses in the quarter that ended June 30.