Invalidate caches for problem with stubs.
(cherry picked from commit bbac5c7)