Mark raise_invalid_node as private (not part of public API).