Remember the Russians have had problems with Muslims in caucasus and maybe as a favor to the US to stay out of Afghanistan??
At that time Islamistic movements are not yet considered a main threat against which unity seems possible - a 'favor' to the US seems unlikely as long as there is no guarantee that it will get returned - the turn of Iran to an Anti-American position was a clear improvement from a Soviet POV - and a public commitment of Carter, that Communism is better than Islamism, and the Afghan resistance is of a similiar islamistic brand than the Iranian regime, seems absolutely impossible.
[A joint resolution, that the US has the right to defend it's citizens against the Iranian regime, while the Afghan Government (communist) and it's Soviet allies have every right to defend 'the Afghan people against islamistic terrorist's and their supporters' "with all means necessary" - which, at least implicitly, means, the right to destroy Pakistan if it doesn't end support for the Afghan resistance - might do the trick - but I can't see no way in hell that the US would go for it...]