This issue related to the scalebar and legend implementation, which may eventually remove a symbol from the symbolset (with name "scalebar" and "legend") but doesn't update the symbol references for the symbols with larger indexes than the removed symbol.
Update symbol references when removing a symbol (#4656)
Think it was already fixed, closing
The symbol references in label cache should also be updated. When embedding both the legend and the scalebar, we may experience that a legend is drawn twice at the original location and the scalebar location.
Update symbol references in labelcache when removing a symbol (#4656)