Please ignore this patch. After sending it, I noticed that the backgrounds in Word Viewer changed from gray to white after leaving the tab and returning to it, when on Windows they stay gray the whole time. More tests are needed to determine when exactly InvalidateRect should be called.
The first patch is still good, and does not appear to cause any negative side effects.
-Alex