26.—(1) If in any proceedings under Part IV or VI the child to whom the proceedings relate is not a party, the court may, if it is satisfied that it is necessary in the interests of the child and in the interests of justice to do so, appoint a guardian ad litem for the child.

(2) Any costs incurred by a person in acting as a guardian ad litem under this section shall be paid by the health board concerned. The health board may apply to the court to have the amount of any such costs or expenses measured or taxed.

(3) The court which has made an order under subsection (1) may, on the application to it of a health board, order any other party to the proceedings in question to pay to the board any costs or expenses payable by that board under subsection (2).

(4) Where a child in respect of whom an order has been made under subsection (1) becomes a party to the proceedings in question (whether by virtue of an order under section 25
(1) or otherwise) then that order shall cease to have effect.