     ## reparented into an HTML Document.)
     svg = @svg.replace /^\s*<(?:[^<>'"\/]|'[^']*'|"[^"]*")*\s*(\/?\s*>)/,
       (match, end) ->
-        unless 'xmlns' in match
+        unless match.includes 'xmlns'
           match = match[...match.length-end.length] +
             " xmlns='#{SVGNS}'" + match[match.length-end.length..]
         match

isPreact = (data) ->
  typeof data == 'object' and data?.type? and data.props?
renderPreact = (data) ->
  require('preact-render-to-string') data

$static = Symbol 'svgtiler.static'
wrapStatic = (x) -> [$static]: x  # exported as `static` but that's reserved

          ## Include new <symbol> in SVG
          unless found?
            tile.setId @id key unless tile.id?  # unrecognizedTile has id
            svg.appendChild tile.makeXML().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
