Hypothetically let's say a special fet type driver was made to try to get the most out of an 18650 cell size (max of around 20-30 amps), and you forced a 21700 down the throat of the flashlight with modified hardware.
If anything broke, it would probably be the driver itself. The LED would have to be overdriven to begin with, because and LED has a maximum drive which can be put into a supermax state.
The typicall tolerance of an LED is 180% to 220% of the maximum. For example the CREE LED xhp50.2 has a stated max of 2000 lumens. But it can be driven to nearly 4000.
As you can imagine to is not going to have anywhere near the suggested 50,000 hour runtime at that supermax. The runtime will be reduced. On top of this a failure curve needs to be writen in.
Once in a blue moon some overdriven LED lights fail, especially when around 200%. This overwork can cause a spontaneous high temperature, which if you know your physicas happens all the time with everything. I fact in the room you're sitting in there are enough nitrogen atoms at a temperature hundreds of degrees below zero that if they all stayed around you it would freeze you to death !
On that scale temperature anomalies are rare. LEDs are small, I'm sure anomalies add up and can cause a failure but the point is statistically these over driven LEDs do fail at a rate of 2-4 percent vs much less than 4/1000 for max driven or less LEDs.
But the chance you will hurt the LED in your light is zero. The strongest batteries definitely have a contingency in place and manufactures are aware of all batteries.
However generally speaking most lights don't need the highest output batteries they just need enough amps. Typically you wont see much of a brightness difference with high amp cells but the energy loss and runtime sacrificed is huge.
And it is not easy to calculate. A 3300mah 18650 doesnt last only 10% longer than a 3000 mah cell, it may last 13 or even 15 percent longer in time because of energy thresholds and wasted amperage that just gets resisted by the driver anyway.