Hi @exilegreen, this is a known bug that will be fixed in next release. See fixes functions to use variables set by filter runs by saqimtiaz · Pull Request #7906 · Jermolene/TiddlyWiki5 · GitHub
You can test your code in the demo wiki with the fix in it:
https://tiddlywiki5-8jp45lsqq-jermolene.vercel.app/
This bug was also reported here: Function Idiosyncrasy: Bug or Feature?