There's one problem with the "guns protect against tyranny" thing - the armed forces. If they're against the populace, then there's no amount of guns in private hands which can beat them.
That's an oversimplification. While a true conscript army with distributed hardware (like we had in Sweden) would be much better from that standpoint; if the army is the populace, then they cannot by definition be put to the task of quelling the people, armed resistance from the population is not without effect.
Now, exactly how useful an armed populace would be against a professional army in a civil war setting is a more complex issue than what you make it out to be. While a a populace armed with handguns and rifles is no panacea, many guerillas have been successful with a similar level of armaments. Especially initially. You need to be able to resist from the outset if you're going to be able to mount an effective resistance at all.
To this you have to add the motivation of the army you're up against. Killing your own people is hard. Adding armed resistance makes it harder, psychologically speaking. If people are shooting back, that makes it clear you're not popular. And while it may not do much in the situation at hand (i.e. make soldiers lay down their arms), it will give them pause later. (If history is anything to go by.)
But that's not to say that lightly armed guerillas are usually effective in the common military sense of the word. Not without outside support (c.f. Mujahedin in Afghanistan during the Soviet invasion), esp. in unfavourable terrain. However, for outside support to be effective in the first place there has to be an organisation available to use it. Hence the CIA-sponsored "stay behind" organisations that sprung up in secret in Europe after the war. Note that much of the physical support to those organisation was in the form of preplaced caches of weapons, ammunition, explosives and communications gear.
Its also not for nothing that the previous Swedish handling of firearm licenses was distributed to the local police and a purely paper based system. This so that the records could be burned on short notice, to deny an occupier knowledge of who had firearm. This in addition to the cached military arms. One would hardly come up with such a costly and less secure scheme, in a country with traditionally strict firearms legislation, if fire arms in the hands of civilians were of no, to little value in resisting a large, well armed, trained, and regulated (invasion) force.
That's not to disparage other tools, such as explosives, and above all: organisation, communication, and leadership. (In fact, in order to avoid a secret state-within-the-state that's all that the Swedish stay behind movement organised in peace time. Leadership cadre and comms people. That's all that needs to be in place to get a head start.) However, firearms have their place. You for instance shoot collaborators, you don't blow them up. That's far too messy and runs the risk of collateral damage. Something that an organisation relying on popular support can ill afford. Same with isolated soldiers on a break. Now of course, an regular ambush starts best with a big bang, but there are lots and lots of other operations that aren't regular ambushes. (You'll for example be shooting a lot of collaborators. Easily ten times as many as the enemy...)
After all, one must never forget that the reason COIN (COunter INsurgency) operations are so notoriously difficult is that in order to succeed, the army needs to win. The guerilla need only not lose. And not losing, i.e. being able to continue carrying out operations, is much easier than winning; aka rendering your enemy completely ineffective and unable to conduct any operation at all.
It basically comes down to popular support and motivation. Those who have it will in the end win. Those who don't will lose. Guns can be substantial motivator, and communicator.