I only had this happen once and it was on a new machine. when I initally built the MD, once up and running it did not find the DVD drive, I actually had to change the bios settings for the Sata controller. In your case since the drive was in and working. I would look at a cable or pwr cable issue to the drive itself for sure if it is Sata, believe me I have a server with 11 Sata drives, I keep a lot of spare Sata cables lying around as they fail quite often. I have tried the locking style as well but for the extra 2-3$per cable they also fail just as much.
I also notice on my hybrid though if I fall asleep with a DVD at the menu stage and there is actually a menu on the screen and i hit stop on the remote, it will stop but will not eject the disc, I have to go to manage drives and eject from the command under living room - play-rip-eject. is the only way. So I am not sure if there maybe a buffer or caching related to the drive itself that is filling up and will not dump without interaction. Just an FYI.