Invalidate region caches only if buffer text is going to be changed.