This is strictly speaking not a bug in UPPAAL, but a problem in the language. The problem is with the array parameter only; it is not a reference to a constant array of integers, but a reference to an array of constant integers. Therefore the type checker does not realise that the argument cannot be modified by the function.
I will try to make a workaround for this.