There seems to be an underlying refrain that in a counterinsurgency effort enabled, as it were, by a foreign power, the enemy centre of gravity is the presence (and related perception) of foreign activity itself. The more insular and, for lack of a better word, xenophobic the society (societies) involved, the more intractable the quandary. A highly xenophobic society seems to view even the most exemplary behaviour of a minimal outside presence as barely tolerable.
I am not sure that ideology or xenophobia (for a lack of better word) has anything to do with the fact that noone likes a foreigner to come in his home to fix what that foreigner perceives as a problem.
In most of the cases, the problematic for a foreign power is to find the right individual who will symbolise both changes and legitimacy in the eye of the Host Nation population.
Even if you tried to install a hardcore islamist government in an environment as Astan (Which could be perceived by an external observer as extremely legitimate and respectfull of population whishes), you would most probably still end up with a strong opposition/insurgency/resistance.
The foreign power is the center of gravity, for the best or the worst.