Compare `grad_preserves_dense` and `structured_grad` here.  Also add them to the hash below.