Expression caching

improved version of #9006 (which was an improved version of #8942)
such expression would result in infinite digest though because we'd recreate the constant object during each reevaluation.

this could be fixed in the future, but I'm not going to deal with it now. instead I'll just remove this single spec.