c_4_grad: bug fix when crashing on calculating grad from scalar field