Use LED as a latching diode
The LED drops too much voltage. For it to work reliably you need the input voltage to exceed Vih which means about 3.5V with a 5V supply, meaning there is only about 1.5V for the LED, and the output will not be exactly at Vcc either since it's sourcing some current. 

It might work more-or-less unreliably (very little noise margin and when warm) if you use red color LEDs (the lowest drop of visible LEDs) - the typical Vih at room temperature is about 2.67V leaving about 2.3V for the LED. Some red LEDs have typical 1.75V or so at room temperature.