Fix two bugs in projection stream caching.

The cached stream must be invalidated when the precision changes, and when the
context is changed.