As President Donald Trump was raging during a White House meeting this spring that fellow members of the NATO alliance had refused to join his military operation in Iran, he had a thought.