When terms inside other terms, there is a limitation around passing variables down to other terms, but I'm not sure about the nature of such limitation. Here is an example:
-bar = { $n ->
[0] some
*[1] another
}
-foo = before { -bar(n: $x) } after
-foo is just an abstraction around -bar, delegating to it a piece of the message, but passing $x down to -bar is forbidden, with parsing error E0014: Expected literal.
cc @gonzalocordero