In my view, a wholesale embrace of cultural chauvinism (as I have defined it) is never justified, but limited chauvinistic shifts in moral opprobrium (which take a chance on devolving into real chauvinism) might be. But even these limited chauvinistic shifts would not be justified merely by finding that some other culture is associated with behavior more awful than ours on this or that social issue.
Are there hard and fast rules for when taking-a-chance-on-chauvinism is justified? No, of course not, but here are some potential rules of thumb to consider. Before a shift of chauvinistic opprobrium towards some other culture becomes reasonable, that culture has to be EITHER:
(a) clearly aligned with ours (because we have a responsibility to keep decent allies),
(b) clearly oppressing ours from a position of greater power (because you can't blame people for being negatively disposed towards their oppressors),
(c) more awful than ours on the average of all possible dimensions--including the dimension of launching imperialist mass-murdering thieving wars and torturing mostly innocent people in onshore and offshore penal colonies worldwide.
Even these rules of thumb are going to start more arguments than they resolve. Since "aligned", "oppressing" and "average of all dimensions" are fuzzy concepts not amenable to clean and sharp measurement, some wrangling is inevitable over any particular chauvinistic shift under consideration. Also, cultures don't "do" things--people associated with those cultures do things, and how much a whole culture should be tainted by what the people associated with it do is a difficult question to resolve. Heuristic simplicity calls for one approach and integrative complexity calls for another.
In the present context, though, I feel comfortable saying that attacks on Islam by influential TV talking heads are pretty vile  while Guantanamo remains open and U.S. leaders still get us into mass murderous wars around the world--mostly in the Muslim world, and mostly precipitated by our own policies (or those of our allies). As long as the U.S. continues killing, torturing and robbing mostly Muslim nations and peoples, attacking Islam for the worst practices associated with it has a strong whiff of war propaganda, and deserves to be called out as such.
I suggest, therefore, that we give Maher and Harris a brief round of ironic applause for "not being racist" and then invite them to get a clue. And, for an encore, could we stop the latest war please?
 As many (most?) people worldwide will attest, those who rule and represent the U.S. tend to treat non-Americans, particularly those without money, as either (a) expendable collateral damage in resource-thieving wars, (b) cheap exploitable labor for multinational corporations, or (c) suckers to fleece with innovative financial machinations backed up by U.S.-dominated international lending bodies. Actually, with regard to (b) and (c) our leadership tend to treat us Americans largely the same way.
As a believer in American-style liberal democracy and individual liberty, I prefer to see the way U.S. leaders treat others as an inversion of democracy and liberty rather than as a reflection of these values. I might be a minority in my country a lot of the time, and I'll admit that the majority of my compatriots can often be propagandized into supporting the latest imperial massacre and other terrible policies that ultimately serve power, not people. Nevertheless it is meaningful that a liberty-respecting yet peaceful minority [?] of liberty-and-democracy-loving Americans exists. Our existence is evidence that one can believe in liberal democracy and individual liberty without worshipping violence or seeing everyone else as expendable obstacles or means to an end. Indeed, those of us who interpret democracy and liberty as calling for peaceful and humane conduct would argue that we are more correct in our interpretation of these fundamental American values than is our country's leadership. We are not ashamed of liberty and democracy--we are ashamed of what our leaders have done to pervert those ideals, and what our own people have often done in obedience to that perversion.
If we are going to honor the best potential in democratic liberty in spite of saliently atrocious (and sometimes majority-supported) American behavior, why should we not do the same for Islam? There do exist atheist-and-dissident-tolerating, non-misogynist, and non-homophobic believers in Islam after all--one of them just won the Nobel Peace Prize in fact. It is at least a possibility that this admirable minority [?] of Muslims have interpreted Islam more correctly than, say, those who get propped up by our sociopathic allies in the House of Saud. If we hold out hope for the best potential in democracy and individual liberty in spite of the beliefs and behaviors of American leaders, why not extend the same charity to Islam?
 Yes, I know this an unusually narrow definition of racism. I personally would also count as racist an institutional failure to prosecute police killings of unarmed black teen agers as well as de facto racially biased institutions like the War on Drugs, mass incarceration, the death penalty, environmental sacrifice zones, etc. The most animating motivations for these injustices are probably rooted in something other than an aesthetic dislike of black racial features, but I won't be able to make the tongue-in-cheek point I'm going for with a broader definition of racism that includes these motivations.
 Obscured by my ellipsis when quoting Affleck's comments about the Iraq war was Maher's interjection that he did not favor killing more Muslims. That is probably mostly true. Unlike Harris, Maher has been particularly critical of U.S. imperial wars and torture. Maher did favor the assassination without charge, trial or conviction of American citizen Anwar al-Awlaki (whose only evidentially-confirmed "crime" was being an anti-American war propagandist). But Maher's support for setting this potentially Constitution-canceling legal precedent probably grew more from his liberal Democratic loyalty to the Obama administration than out of reasoning soundly from his most cherished principles. My guess is that Maher's decision to make high profile attacks on Islam in partnership with a War on Terror propagandist like Sam Harris is probably the result of smug cluelessness more than anything else. With regard to War on Terror ideology, Maher seems like a useful idiot while Harris seems like more of a true believing apparatchik.
 If we used Harris's criterion for judging wealthy white American men, for instance, that would clearly not be fair to them. It would be grossly unjust to judge wealthy white American men--and their associated ideologies--for the bewitching effect that the likes of Harris and Maher have on some sizeable proportion of them. People tend to look for ideological leaders wherever they can find them and sometimes, regrettably, those leaders are cultural chauvinists. But that is not necessarily the fault of the human category or worldview that those leaders associate themselves with. The members of that category or the followers of that worldview should not be judged by the low quality of the leadership that capitalist or other social forces produce for them.