def _protect_consolidate(self, f):
blocks_before = len(self._data.blocks)<EOL>result = f()<EOL>if len(self._data.blocks) != blocks_before:<EOL><INDENT>self._clear_item_cache()<EOL><DEDENT>return result<EOL>
Consolidate _data -- if the blocks have changed, then clear the
        cache