[composer] Fix possible crash in scale bar update (refs #11394)