As origimbo noted in their answer, in the 2016 leadership challenge there was uncertainty as to whether Jeremy Corbyn would be required to obtain the requisite nominations, or whether he would be entitled to a place on the ballot due to his position as the incumbent.
The Labour Party National Executive Committee (NEC) resolved this issue in their meeting on July 12th, 2016, and allowed Corbyn access to the ballot. A description of the meeting was posted by NEC member Ann Black OBE on her website; the relevant section is below:
After three hours we moved onto the agenda, with the first decision as
to whether Jeremy Corbyn as the incumbent would automatically be on
the ballot. We heard from James Goudie QC who said he would need to be
nominated by 20% of MPs and MEPs, the same as challengers, and had
copies of conflicting legal advice which said he wouldn’t. The
rulebook is frankly a mess. There are anomalies: because candidates
only need nominations from 15% of MPs / MEPs where there is a vacancy,
Jeremy Corbyn would face a lower threshold if he resigned and stood
again than if he stayed put, which seemed silly. Others said the
rulebook never envisaged a situation where a leader did not have the
confidence of 20% of his colleagues. My feedback seemed typical in
splitting 50 / 50, with some members saying that regardless of their
personal preference the winner would not be seen as legitimate if
Jeremy Corbyn was excluded.
The discussion was lengthy and wide-ranging. There were calls for
Michael Mansfield to address the NEC, but a vote to hear from more
lawyers was lost 13 – 19. I voted against, as I doubted whether any
minds would be changed by further representations. Some NEC members
then proposed letting Jeremy Corbyn back in for the vote. This was
carried 16-15. I voted against, because of precedent and because of
concerns about legitimacy if he only got on the ballot through his own
vote. This was in fact not necessary as the meeting voted 18-14 that
he should automatically be on the ballot. I voted with the majority,
as promised: doing otherwise would be seen, rightly, as a stitch-up,
and he could probably have gained the 51 nominations anyway. And this
decision now frees MPs to nominate according to conscience.
The Labour Party rules have now been amended to clearly state that in the event of a leadership challenge, the incumbent Leader/Deputy Leader are not required to satisfy the nomination requirement:
Where there is no vacancy, nominations may be sought by potential
challengers each year prior to the annual session of Party conference.
In this case any nomination must be supported by 20 per cent of the
Commons members of the PLP. Nominations not attaining this threshold
shall be null and void. The sitting Leader or Deputy Leader shall not
be required to seek nominations in the event of a challenge under this
rule.