The commas don't effect the meaning. No matter how you read it, it contains the statement that the right of the people to keep and bear arms shall not be infringed. That is the part which states that the people have said right, and it is the part which limits what the Federal Government may do in regard to said right, i.e., nothing which will infringe upon it. The first part simply sets it up and explains why the last part is so important to continued liberty, i.e., without this limit on the Federal Government, folks might not be at liberty to form well regulated militias when and if the need arises, and since said militias, when required, are necessary for the preservation of a free state, their suppression would be a threat to the system of liberty that we've just worked so hard to establish.
It does not in any sense place a limit on this limitation of Federal power, such as "This limit on Federal Power only applies to those who are currently serving in a well regulated militia." That would be absurd on its face, since in order to begin serving in a well regulated militia, you'd need to already have arms, and be thoroughly familiar with their operation. Remember, militiamen are those who muster with their own weapons in response to an emergency. People whose weapons are issued to them by the government are referred to as soldiers, not militiamen.