This is not a bug, but how it is designed/supported by the index part, which can be a number or a variable, not an expression. Same is for index of avp, xavp or headers, just to give a few examples.
If someone wants to extend, can make a pull request. So, if nobody wants to take over it soon, this issue will be closed. The PR can be done independently.