Fix crash on legends with sizeunits (#4785)