Do better error checking in GpuArray_index.
Add an untested case to the testsuite.