As I discuss in this question, by far the most popular school of Hindu philosophy is the Vedanta school. But there are five other Astika or orthodox schools of Hindu philosophy: Purva Mimamsa, Samkhya, Yoga, Vaisheshika, and Nyaya. My question is about the Samkhya school, founded by the sage Kapila. Verse 55 of Ishwara Krishna's Samkhya Karika, one of the defining texts of the Samkhya school, describes the misery the soul experiences as long as it's in Samsara:
tatra jarāmaraṇakṛtaṃ duḥkham prāpnoti cetanaḥ puruṣaḥ |
liṅgasya ā vinivṛttes tasmād duḥkhaṃ svabhāvena ||
There, the intelligent Spirit experiences pain due to old age and death, till the cessation of the Linga; hence misery is of the nature of things.
Now this excerpt from the Yuktidipika, an ancient commentary on the Samkhya Karika of unknown authorship, gives various examples to illustrate that even the Devas and other exalted beings are subject to misery:
If it is asked how the pleasure is pervaded by misery, (we reply), because of the possibility of impurity, decay and surpass ability right from the (world of) Brahma. And, because that (possibility) is the cause of misery. (It is known through the following:) because the disease of eyes is heard in case of Prajapati, because of the trouble of sexual desire in case of Indra, because of the defeat of Gautama and because of the attainment of the state of stone in case of Rambha through the curse, because of the trouble of Sarpasatra to the serpents, and there is the attainment of the state of elephant in case of Vaishravana on account of the curse of Yaska, because of the stay in hole in case of the parents of Jaratkaru, because of banishing the Pishachas through the use of vedic chants, medicines, and auspicious things, and because the human beings and the lower animals are directly observed to be the abode of misery.
Most of these stories are recognizable: there's the story of Brahma losing his eye described in this Kanda of the Taittiriya Samhita of the Yajur Veda; there's Indra being Indra; there's the story of Vishwamitra cursing Rambha which I discuss here; there's the story of Janamejaya trying to kill all the snakes of the world; there's the story of the Pitris of the sage Jaratkaru described in this chapter of the Adi Parva of the Mahabharata.
But I'm interested in the part in bold. For those who don't know Vaishravana is a another name for Kubera god of wealth. So my question is, what is the story of Kubera being cursed to turn into an elephant by Yaska?
The only Yaska I know of is the author of the Nirukta, a famous Sanskrit etymological text. Is it possible that it's a translation error and that it's Yaksha rather than Yaska? After all Kubera is the king of the Yakshas. In any case, how did Kubera get cursed, and how did he ultimately get freed from the curse?