mesa: fix type for array indexing validation