Add check so OpenCL kernel doesn't access out of vector bounds.