Tipallatthamiga Jātaka (No.16)
Once the Bodhisatta was born as a stag, leader of a herd of deer. Rāhula was his sister’s son and was entrusted to him, that he might learn the “deer’s tricks.” The young stag followed his instruction diligently and one day, being caught in a net, he feigned death and so made his escape.
The story was told in reference to Rāhula. Once, at the Aggāḷava-cetiya, the Buddha, noticing that monks were in the habit of sleeping with novices in the Dhamma hall after the discourse, he passed a rule making this an offence to be confessed (pācittiya). As a result, Rāhula could find no lodging and spent the night in the Buddha’s latrine, not wishing to transgress the rule. The Buddha, discovering this, assembled the monks and blamed them for their thoughtlessness, for if they thus treated his son, what might they not do to the other novices. The rule about lodgings was thereupon modified. The story was related to show Rāhula’s diligence in following rules (J.i.160 ﬀ; cp. Vin.iv.16).
The Jātaka seems also to have been called the Sikkhākāma Jātaka. JA.1876, p.516.