The /scid workaround would be nice if it worked, but it does not. This does allow the command to call itself but it does not allow the first instance of the alias to continue when all child instances have completed.

If it might help then I will include the code:
alias lema.recurse.thememsg.buildbracematrix {
  ;Usage: %ht %node %msg
  var %ht = $1, %level = $2, %j = 1, %node, %re = /(\([^(]*?((?:\(.*\))?)[^(]*?\))/g
  tokenize 32 $3-

  ;In the following regex all odd numbers contain level root_level braces, all even numbers contain root_level+1 braces or null if no nested braces
  ;Because root_level+1 may also have a +2 level and +3 and so on, recursion must be used until all even numbers return $null
  void $regex($1-,%re)
  while (%j <= $regml(0)) {
    %node = $+($iif(%level,$+(%level,.)),$round($calc(%j / 2),0))
    if ($isodd(%j)) hadd %ht %node $regml(%j)
    elseif ($regml(%j)) scid $cid lema.recurse.thememsg.buildbracematrix %ht %node $regml(%j)
    inc %j
The alias is first called from another alias to initialise it and is initialised as follows:
lema.recurse.thememsg.buildbracematrix %ht 0 $1-
where %ht is a hash table name and $1- is some data containing nested parenthesis.