tree: Guard against atype corruption Always remove ids if `id` member is set. Untested, but this should fix CVE-2025-7425 reported against libxslt: https://gitlab.gnome.org/GNOME/libxslt/-/issues/140