Danny has already answered the question. But I will add that I have found several duplications of soldiers records in different units. Such as my own GGgrandfather who has a record both in the 2nd Arkansas Battalion and the 3rd Arkansas.
The Soldiers and Sailors list is meerly an index. They just compiled names and didn't validate anything else. This is not to say that there are not mistakes made, but it not unusual to find the same soldier named in more than one regiment. And even between different branches of service such as Infantry, Artillery or cavalry and even Navy as many Confederate ships gun crews were taken from Infantry units.