Re-implement to hold entries in a HashMap so we can easily check if legend entry already added (and just increment its reference count).
Re-implement to hold entries in a HashMap so we can easily
check if legend entry already added (and just increment its
reference count).

simoc/mapyrus,simoc/mapyrus,simoc/mapyrus