Fix use of the new immutable cache API.
Add versioning to the immutable cache.

There is an edge case where at one point a (say) constant doesn't exist in the
cache, but does later. If get_cell is naively elidable, then if the cell doesn't
exist when the tracer first encounters it, it will never be pcked up
subsequently.