(ExportRenderer.render_legend): Do not modify the list returned by map.Layers() in place since it is the actual list of layers used by the map.