It would be a contradiction if this was the mirror universe, where people rise in rank upon the death of another. But that isn't necessarily the case here. Even if the second officer died before waking, Picard would only be the ship's captain until they reached a Starfleet base. At that point, Starfleet would assess the situation, including the captaincy. They could very well say, "Well done, my boy!" and leave Picard in command, or they could simply pin a medal on his chest, add the Picard Maneuver to the history books, and assign a new captain awaiting a command to the ship. Apparently, the latter happened (that or the original XO came out of his coma and assumed command at a later date).