Dynamic partials with lookup not working

Hi, the custom_template exists when printed out and contains simple string custom-post-header. To use this partial we used the code which is on the bottom, and it was working before.
{{>(lookup . 'custom_template') post=this}}
Now it says The partial undefined could not be found

Ghost version 4.30.1

The question is still active.
If theme gets changed inside ghost theme files it works as before, so the problem is with the validator. Somehow it thinks that {{>(lookup . ‘custom_template’) post=this}} is not working

{{#>(lookup . ‘custom_template’) post=this}}{{/undefined}} helped
Also had to run ghost buster