Fixed an error on platforms where the maximum workgroup size can vary between kernels