This issue seems to be caused by the reallocation flag not being set on the device shader data array so it was never updated on the GPU although the host memory was modified.