Fixes z-index of the legend pane content