If you happen to turn it on and let it turn off by itself (which should happen after a few minutes), not only will the flashlight app, but the camera app as well, cease to work or boot up. The only remedy at this point in time? To perform a reset on your Nexus device, and everything will be right as rain after that.
So far, there has been a few Nexus 5 users who have confirmed the legitimacy of this bug, and it does not seem to hit the older Nexus 4 in a similar manner, although the camera will stop working after a few minutes. For the Nexus 4, there is no need for a reboot to fix the problem, since you can open the camera from the lock screen. Hopefully Google will issue a fix for this minor bug soon.