#78326Fatal error: Call to a member function getViewHelper() on a non-object in template cache file
Description
When using nested fluid in <f:layout> in a fluid template, like</f:layout>
<f:layout name="{f:cObject(typoscriptObjectPath: 'lib.layout')}" />
the cache file would get fatal error when parsing the layout name in line 178 in \TYPO3\CMS\Fluid\View\AbstractTemplateView::render(), because $self is not defined in the cache file.
After a few research, adding
\$self = \$this;
before line 98 in \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler would get the error fixed, and the nexted fluid would be rendered correctly.