Those of you who get the Ricardian Bulletin will have seen a very interesting article from Stephen Lark in which he points out that it is possible John Beaufort, Earl of Somerset (first of that long and confusing line) was quite likely legally a Swynford, in view of the probability that he was conceived during Hugh Swynford's lifetime.
Of course, it is also quite likely that everyone (who mattered) knew he was biologically Gaunt's son, bearing in mind how the upper classes work.
The purpose of this post is not to debate Stephen's theory, but to consider the circumstances under which the Beauforts were legitimised. When Gaunt returned from his attempt to conquer Castile, he was well received by Richard II, who had learned in his absence that his earlier hostility to his uncle had been a political error. Gaunt strongly supported the King's peace policy with France, and in return Richard rewarded him generously, most notably with the extension of Lancashire's palatinate status to an hereditary one, and the creation of Gaunt as Duke of Aquitaine. (Had the Gascons not objected, Richard would have gone so far as to allow his uncle to hold this honour directly from Charles VI of France, but as it was he retained the suzerainty.)
The process of legitimisation of the Beauforts was a continuation of this royal favour. Moreover, Richard favoured the Beauforts themselves, possibly seeing in them a suitable counter weight to Henry Bolingbroke.
The point is that in 1396/97 no one dreamed that the Beauforts might ever get near the throne. Even if one assumes that Gaunt was de-facto heir (and this is a million miles from the true position) his son Bolingbroke had four sons of this own. So on the most generous estimate, forgetting the Mortimers altogether (and Henry's daughters), John Beaufort was seventh in line. It was not realistically going to happen. So the nominal status of his birth was really neither here nor there. At least not in 1396/7.
Taking this into account, there is perhaps a logical explanation for Henry IV's decision to exclude the Beauforts from the succession. They were suddenly a whole lot nearer. It would have helped, of course, if Henry had gone on to set out the succession after the heirs of his children - but he was not to know that they would prove to be so infertile. It probably never even crossed his mind that this was an issue.
(Since I wrote this, Stephen Lark has pointed out to me that he said in his article that John Beaufort was likely a biological as well as legal son of Hugh Swynford. My apologies for misunderstanding.)