Numerical simulations of assemblies of grains under cyclic loading exhibit ``granular ratcheting: a small net deformation occurs with each cycle, leading to a linear accumulation of deformation with cycle number. We show that this is due to a curious property of the most frequently used models of the particle-particle interaction: namely, that the potential energy stored in contacts is path-dependent. There exist closed paths that change the stored energy, even if the particles remain in contact and do not slide. An alternative method for calculating the tangential force removes granular ratcheting.