The fallout from the Iran conflict and the approaching U.S. midterms may change Trump’s calculations.