The source of such beliefs consists of rare traditions reported by a single narrator. Second, I do not see any problem with the proposition that God may reveal a law to the Prophet and inform him that the law will be applicable to him and his followers until the time when the Qa'im appears. When the twelfth among his descendants appears he should follow a second injunction.
The Prophet also informs about this arrangement to his successor until the information reaches the last Imam. In such a case the ordinance is not abrogated, and the Imam does not introduce a new ruling that was revealed to him. Rather, the first injunction was already limited in time, and the Prophet was already informed about the second one.
Thus, for instance, social expediency required that the judge should confine his judgement to an objective proof, seeking witnesses, and an oath. The Prophet and the Imams were also required to follow the same procedure in their administration of justice.
However, when the Mahdi appears and establishes the Islamic government, he is required to decide the case on the basis of his knowledge. Thus, this latter ordinance was already part of Islamic judisprudence, awaiting execution after the appearance of the Mahdi.