Do not flush all thumbnails when refreshing.

The flush will only happen before the thumbnail is updated
and when the browser is discarded.
Rebased PR see #1292