Revert of Merge duplicate code in invalidation helper. (patchset #2 id:40001 of https...