Fix for LAMMPS pair_kim bug (part 2).

See commit ec358993f9036117f400c21f588e6e6607839452. The fix in this
commit missed one test leading to wrong results in LAMMPS.