Solves a bug involving multiple OpenCL devices.