I seem to remember that the 5th North Carolina was nearly decimated at the Battle of Williamsburg in May 1862. Your ancestor, having survived Williamsburg, may have gone into Gaines Mill attached to another unit, or it could be that things had just fallen apart in the order of the regiment that his death was not properly filed. Any number of things, I suppose. That was a pretty horrible Spring, and the 5th was in the thick of it.