When Volt is set to 'always' => false, 'stat' => false, the compiled templates will show "flash" or "flashSession" undefined errors.
The solution I found is to use <?= $this->flashSession->output ?>.
In fact, I'm not sure if other volt functions suffer from the same issue because I usually just type php, which is usually shorter anyway.