Fix issues in the NamedMDNode operand iterator, including those pointed out by
Chandler in review.