[composer] Fixed assignment of map to legend + no updates when legend is removed

Thanks to Nyall for his help!