Allow dynamic variables to be used inside advanced queries

I’ve tried to use dynamic variables inside advanced queries, and it doesn’t work, e.g.

#+BEGIN_QUERY
{:title "All todos with tag project"
   :query [:find (pull ?b [*])
   :where
   [?p :block/name <% current page %>]
   [?b :block/ref-pages ?p]]}
#+END_QUERY

This would greatly improve the usefulness of Advanced Queries.