Good video from the HossUSMC on various cornering techniques with a shotgun, which of course can be applied to a rifle as well. The longer the barrel, the more of a problem you'll have.
I would add that if you need to enter a doorway, you want to get through it as quickly as possible - you're most vulnerable to a gun grab if you're slowly edging your way into a room. You're also usually silhouetted in the doorway, making you an easier target - hence the nickname "funnel of death." Don't hang out their any longer than you need to.
No one will argue the superiority of a long gun in a firefight, but when bringing 'em indoors or in vehicles, they bring some special considerations - compromised maneuverability and leverage during a gun grab being two of the biggies.
Another consideration - it's tough to use a shotgun one handed - same goes for rifles, but to a lesser extent. If you need to open a door, pick up a child or shove a loved one out of the way, that long gun can be sub-optimal.
While the long guns win in terms of terminal effectiveness, they have their own tradeoffs that you need to be aware of and train for. And, for many, a handgun may be the better choice for use in the home.
There's an interview floating out there on the interwebs with Chris Costa, where he talks about his choice for home defense: a suppressed handgun. Costa is a guy who has access to pretty much any kind of firearm he wants and has more than a fair amount of knowledge and experience with long guns. He's weighed the options and chosen a handgun over an AR or a sweet Benelli semi-auto for defending his home, at least in normal times.
Interested to hear your thoughts, experience and personal choices.