Currently, arrays cannot be indexed by scalarset elements. This should be supported.
Implemented on the trunk from rev. 1657.