Honorable men on both sides were frequently buried in common trenches, it is an unfortunate part of war, but no personal dishonor was intended to the dead. Horses and mules were similarly buried in mass trenches, or sometime barely covered over with soil by hasty overworked men just wanting to get their horrible nasty work done quickly enough to let them say to their officers that it was done. Horses trench graves are neutral, no honor meant, or certainly no dishonor either, it is simple expedience to get them under dirt quickly. However buried similarly, men buried in trenches are given "meaning". At Treblincka dishonor to the dead was meant. At Shiloh, no dishonor was intended, as both Doyle and Keith's posts above point out.
The question here, was honor or dishonor intended toward the 54th? Were they thought to be criminals or soldiers by the southern officers who ordered the burial parties?