How about if militia isn't relevant to the security of a free state? The US has had a standing army for quite some time now, and by far the most powerful one in the world. And the only thing that looks like a "well regulated militia" is the National Guard.
The second amendment could be interpreted as meaning that only members of the national guard can own guns, but it's not.
> How about if militia isn't relevant to the security of a free state?
This is the interesting thing: in the context of the framers, a standing army would not diminish the importance of the rights of militias at all (and might increase its importance).
Keep in mind that the US declared independence due to perceived government overreach from Britain, which had a huge standing army. One of the primary functions of the second amendment is to ensure that ad hoc militias are possible, to keep the government and its army from overreach.
The second amendment could be interpreted as meaning that only members of the national guard can own guns, but it's not.