Merge "Fix flashing artifacts caused by invalidation bugs"