bug 1052000 - fix some handling of empty text leaves r=surkov