If a faulty LM317 is able to maintain the specified output voltage, like 3.3 or 5V, then I cannot see how it is able to overheat. The power dissipated is (Vin-Vout)*Iload, and with Vout at its rated value, the remaining parameters are fixed beyond the control of the LM317.
The IC cannot even dump a fault current through the regulator pin, as that has a high resistance to ground in your typical LM317 schematic.
If the IC die is improperly attached to the heat sink tab, then the actual heat sink wouldn't show an elevated temperature, as we have seen demonstrated.
So if the load survives, what fault can physically happen in a LM317, which causes it to overheat? Oscillations? Where does the power go?
----
Edit: Silly typo in formula corrected.