Currently, the --persistent-code-cache option does not store outer script wrappers when optimistic types are enabled. Although this is a very thin wrapper class, not storing it will cause some parsing and code generation to take place, which shouldn't be necessary. The only time we should not store the outer script is if optimistic types are enabled but lazy compilation is not, because in this case the outer script would likely contain lots of wrong assumptions that would do harm for later runs when optimistic types are used with lazy compilation (as it should be). However, for non-optimistic types, lazy and non-lazy compilastion can be mixed in the code cache. In fact, a non-lazy compilation will probably be more efficient because it reads the whole script in one step.