Precisely.
A well controlled army being necessary to the security of a free country, the right of the people to keep and bear arms shall not be infringed.
You need the army to keep enemies out, you need to control it to keep it (and the government) from becoming the enemy within.
To that purpose the overwhelming number of private citizens, with their arms constitute a deterrent: therefore, the Right must be protected and left uninfringed.
I disagree with this interpretation. A "Well-Regulated Militia" consisted of basically all the people capable of bearing arms. This Militia was not only a check on government tyranny, an oppressive army being one aspect of such tyranny, but also reduced dramatically the necessity of supporting such an army.
The little noticed Third Amendment prohibits the government from forcing citizens to house soldiers during peace time. Such soldiers were sometimes a necessity but always a concern. Reducing the need to maintain such an army was one goal of the Second Amendment.
The relatively recent militarization of police departments is a fearful development and would have been addressed by our Founders if any such police force had existed at the time of the Revolution.