Issue #939810 by mikeytown2: Notice: Undefined index: key in format_xml_elements()