fix rendering of legendicons with 0-length name (#4782)
Merge branch 'b4782-legend-notext'