Any attempt to deny that the founders were very worried about tyranny imposed by the government of the country in question, and intended the second amendment (among other things) to allow the citizens to resist against the army of that government, is outright ahistorical.
The amendment is quite short and easy to quote; the pro-gun crowd actually hates this one little trick:
> A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.
There is no "obviously we mean our own government" rather than foreign invaders the militias (like the Swiss ones around since pre-revolutionary times) are typically meant to deal with.
And yes, it doesn't explicitly say in the text of the amendment what kinds of threats the militia is meant to defend "the security of a free state" from. This is why you need to make obvious deductions based on context. There's certainly no basis, either in the literal text or in contextual deduction, for the idea that the founders only meant it as security against foreign invasion.
> A well regulated Militia, being necessary to the security of a free State
to mean tyrannical impositions by a standing army of the same state, as opposed to a foreign state, is categorically ridiculous.