There does not appear to be much in-depth history on the circumstances of these narrations and who transmitted them. By the time that they were narrated in Bukhari and Muslim the concept of 'Imam' did exist explicitly and was known in wider circles. It certainly would not have been in the interests of Bukhari to cite a narration that mentioned the word 'Imam' and 'Bani Hashim', since that would have clearly overturned the forced legitimacy of Abu Bakr and 'Umar's caliphates. In particular 'Umar held that that the successorship belonged to 'the people' (meaning Quraysh). The Uthmaniyya, being of Quraysh, therefore held that the caliphate belonged to them. One can surmise that perhaps there may have been narrations in circulation predicting twelve Imams, but that the wording had been 'adjusted' to mask the true implication, if not to 'redirect' the meaning of the narration to suit political purposes. It really needs an expert like Suleiman Ali Mourad (who has analysed the 'transferral of authorship' between the Ahl al-Bayt (as) and various figures in the Sufi tradition, i.e. the attribution to Sufi figures of sayings of the Ahl al-Bayt) to do a proper textual, historical analysis of these narrations.