Reduce legend container scope to instance

The legendEl variable was not scoped to the instance, so both map
map buttons targeted the most recent value.
Fixes #263