MessageBag and Debug Mode false with a strict twig policy

.env

CMS_STRICT_VARIABLES=false
CMS_STRICT_COMPONENTS=true
CMS_TWIG_CACHE=true
CMS_ROUTE_CACHE=false
CMS_ASSET_CACHE=true
CMS_ASSET_MINIFY=false

from cms.php

    'security_policy_v1' => env('CMS_SECURITY_POLICY_V1', false),
    'exception_policy_v1' => env('CMS_EXCEPTION_POLICY_V1', false),

I have a form where I access the MessageBag like this:
messages.first('searchterm')

And twig throws the message
wig\Sandbox\SecurityNotAllowedMethodError: Calling any method on a "Illuminate\Support\MessageBag" object is blocked

Ok so basically the call of the first() method on the messageBag object is not allowed. But what options do I have now if I would like to run my page in strict mode?

Passing everything as a variable seem to be a bit over the top.

Any other good options here?

Nvm, found the official solution: