Caching the translated string instead of the compiled function, to allow different environments for each invocation.
Adaptation to 5.2.