Do not weakly retain caches whose computation has side-effects

Lazy scopes write REFERENCE_TARGET to trace as a side-effect, when weak caches are cleared, resolution may be repeated, and a rewrite error happens
Expose lazy scopes to enable calling forceResolveAllContents()
Buildserver auto merge