In TwigEnvironment::updateCompiledTemplate, an attempt is made to save the compiled template. However, it does not check the return value of `$this->storage()->save`, which can return false.
This results in the assumption that the new file got written out, so it is loaded with `$this->storage()->load` (return value not checked here either), and then a fatal error when `new` is called for the new class.
I ran into this by changing the twig cache directory to a directory which was not writable. There was no indication that that was my problem, just a fatal error.