Note that the references are to "all negroes" in general, not specifically to Southern free negroes or slaves. Therefore, it quite clear that U.S. colored troops were not considered to be "real soldiers," with the same rights and protections as white soldiers.
It is also interesting, and disingenuous, that the Index of Military and Naval Laws sets forth the authority of the Confederate States to employ and impress free negroes and slaves in the war effort, while simultaneously claiming that for the United States to do so violates the "laws and usages of war."
509. That, in the judgment of Congress, the proclamations of the President of the United States dated respectively September twenty-second, eighteen hundred and sixty-two, and January first, eighteen hundred and sixty-three, and the other measures of the Government of the United States and of its authorities, commanders, and forces, designed or tending to emancipate slaves in the Confederate States, or to abduct such slaves, or to incite them to insurrection, or to employ negroes in war against the Confederate States, or to overthrow the institution of African slavery, and bring on a servile war in these states, would, if successful, produce atrocious consequences, and they are inconsistent with the spirit of those usages which in modern warfare prevail among civilized nations; they may, therefore, be properly and lawfully repressed by retaliation.