On the third round of diamonds, East actually discarded a spade - and West discarded a club. Before anyone played to the next trick, however, West discovered that he still had a diamond.
So West played his diamond, and his club became a major penalty card. South thereupon played a spade to dummy's king and East's ace and, as was his legal right, required East to lead a club. Because East still had a club, declarer now made the rest, but if East had discarded that club on the third round of diamonds, he would have been at liberty to cash his remaining hearts.
No, I don't know why declarer played the hand as he did - it would seem normal to cross to dummy in diamonds and play a club to the jack, thus going down four. But perhaps South considered the club finesse a lesser chance compared to playing RHO for ignorance of basic safety plays to guard against partner being about to revoke. And who is to say that he was wrong?

Help
