A person appointed guardian ad litem by a court for an infant or incompetent defendant is not liable for the costs of the action.