This LM317 circuit is a great current regulator for diodes, but I would make 2 small changes that will solve the disconnected diode problem.
1. Replace the silicon diode with a zener diode (Digi-Key - MAZ40240LFCT-ND (Manufacturer - MAZ40240LF)). This will clamp the output voltage to no more...