Fix bug#5856: don't dereference glyphs beyond end of glyph_row.