Imagine the War of Spanish Succession goes heavily in France/Spain's favor, allowing Philip V of Spain to maintain most of his continental territories (Spanish Netherlands, Naples, Milan, etc.). I'm not exactly sure how royal inheritance works, but as an additional clause in the new Treaty of Utrecht, could Louis XIV stipulate either:
- Philip V renounces his Spanish throne, ascends to the French throne, and then gains all of Spain's territory, OR
- Philip V remains King of Spain and merely inherits all of France's territory.