That one got me thinking, didn't I successfully use variables in my indexes in the past?
I just checked, and it was not a normal variable, but a 'Parameter'.
If you want parameters for your Verilog module, say a configuration for the address size for a block of memory, the assigned label you use for the parameter is allowed in your indexes.