xml_utils: Fix memory bug Robin pointed out in debug panel.