Fix #1210
Unit test
Regression test
EXPECT is better here than EXPECTF [ci skip]
Merge pull request #1212 from sjinks/issue-1210

[FIX] Crash while rendering element's label