Silent Mandavya is taken for an accomplice and impaled. He survives, and sages visit him as birds. Freed with the stake's tip left in him, he goes to the seat of the god of justice and learns the cause: an insect he pierced in childhood. He calls the punishment out of measure, lays down that a child's act is no sin, and curses the god to be born a Shudra; so Vidura is born.
A man carried by his wife Shilavati brushes against the impaled sage, who curses him to die at sunrise; her devotion stops the sun from rising until Anasuya persuades her to relent.
What is different here:
The curse falls on a passer-by, not on Dharma; attached to the Anasuya cycle. Primary text not opened.