Fix mistake in kernel. It behaves correctly for the Nvidia
implementation (GTX Titan), but it behaves non-deterministcally
for the AMD-APP-SDK (CPU implementation).