           ## Include new <symbol> in SVG
           unless found?
             tile.setId @id key unless tile.id?  # unrecognizedTile has id
-            svg.appendChild tile.makeXML().documentElement
+            svg.appendChild tile.makeDOM().documentElement
             if symbolIds.has tile.id
               console.warn "Multiple symbols with id '#{tile.id}': This shouldn't happen, and SVG likely won't load correctly."
             else

          match = match[...match.length-end.length] +
            " xmlns='#{SVGNS}'" + match[match.length-end.length..]
        match
    @xml = new DOMParser
      locator:  ## needed when specifying errorHandler
        line: 1
        col: 1

    ## Remove from the symbol any top-level xmlns=SVGNS or xmlns:xlink,
    ## in the original parsed content or possibly added above,
    ## to avoid conflict with these attributes in the top-level <svg>.
    @dom.documentElement.removeAttribute 'xmlns'
    unless @getSetting 'useHref'
      @dom.documentElement.removeAttribute 'xmlns:xlink'

    ## Wrap XML in <symbol> if not already.
    symbol = @dom.createElementNS SVGNS, 'symbol'
    ## Force `id` to be first attribute.
    symbol.setAttribute 'id', @id if @id?
    # Avoid a layer of indirection for <symbol>/<svg> at top level
    if @dom.documentElement.nodeName in ['symbol', 'svg'] and
       not @dom.documentElement.nextSibling?
      for attribute in @dom.documentElement.attributes
        unless attribute.name in ['version', 'id'] or attribute.name.startsWith 'xmlns'
          symbol.setAttribute attribute.name, attribute.value
      doc = @dom.documentElement
      @dom.removeChild @dom.documentElement
    else
      doc = @dom
    for child in (node for node in doc.childNodes)
      symbol.appendChild child
    @dom.appendChild symbol

    ## <image> processing
    domRecurse @dom.documentElement, (node) =>
      if node.nodeName == 'image'
        ###
        Fix image-rendering: if unspecified, or if specified as "optimizeSpeed"
