Running gmx editconf corrupts some of the crystal coordinates

GROMACS version: 2022.1
GROMACS modification: No
I am trying to simulate an amide crystal. In order to do this I need to use editconf to make a 4x4x4 unit cell box where each unit cell contains four molecules. So I have 64 unit cells of 4 molecules each. The command I use is:
gmx editconf -bt triclinic -f $NAME.gro -o “$NAME”_box.gro -box 3.844 2.608 2.896
-angles 90 90 90 -pbc 90 90 90 -pbc &> editconf.out
I can see in PyMol that the starting coordinates are fine, but the resulting box coordinates for about a dozen or so molecule pairs is corrupted. What happens is that CH3 atom of the acetyl group which starts about 1nm away from the CH3 of the N-methyl group of a molecule in the next unit cell, moves (with its H-atoms) to about 0,05nm away from N-methyl CH3. So now, for these 12 (periodically related) molecule pairs, I get a bonded C-C group with 6 H-atoms each bonded to 2 C-atoms. I have generated boxes for a number of different amide crystals. but the is the first time I have encountered such strange behavior.
If anybody has any idea of what might be going on I would be very happy to hear from them.