The checkered shirt may have been used to wrap a wound to the lower leg. The soldier may have had a couple of extra shirts, pulled both out and laid the unused one on the fence rail.
The pack behind the soldier's head almost certainly was placed there by someone else, perhaps the photographer himself. Elevating the soldier's head does make for a better image.
The belt buckle may be worn upside-down, 'U.S.'
Photographic History of the Civil War says this is one of Ewell's soldiers left on the field at Alsop's Farm. This is one of at least four images of Confederate dead taken this day. You have mentioned two of them. A third shows another dead Confederate nearby, the fourth showing a group of Confederate soldiers gathered for burial.