No, its not. Because in your scenario, the dog is Mecca, but Mecca didn't bite you.
If these governments are not doing everything possible ie; closing these schools that teach the hate that breeds the terrorist,then they are responsible for what these people do in America.
I agree completely. But shouldn't that mean you strike at the governments responsible rather than some Mecca? That's my point. If Iran is sheltering supporting a group that nukes us, shouldn't we retaliate against Teheran rather than Mecca?