'Prevent the invalidation or recomputation of ``fields`` on ``records``.'

@contextmanager
def protecting(self, fields, records):

    saved = {}
    try:
        for field in fields:
            ids = saved[field] = self._protected[field]
            self._protected[field] = ids.union(records._ids)
        (yield)
    finally:
        self._protected.update(saved)
