ja, looks like anytime you use an array variable inside array brackets, it falls over ... like this works (assumes func() returns zero say):

$b[func()] = "a"

but this breaks it again (assume func returns the value of its parm):

$b[func($a[0])] = "a"

and trying to fake it out with VAL() or math tricks no work:

$b[val($a[0])] = "a"
$b[0+$a[0]] = "a"