The protection diode which is absolutely necessary in most such designs, yet most LM317 datasheets omit it, or shove it at the end of the datasheet, causing a lot of blown devices designed by inexperienced people who missed the diode.
It's required to bypass large back-flow currents in typically two cases:
1) Input short during operation, which discharges input capacitors faster than the output caps discharge,
2) Too much output capacitance compared to the amount of input capacitance, or a battery at the output.