Replace render_esi with render because render_esi does not support the passing of objects:
https://github.com/symfony/symfony/issues/10524#issuecomment-38456634