Fix bug 1173773 by invalidating the rectangle around the text