Implement invalidation as a flag check, not a function call.