BenStokes commented "“The first thing that needs to be said is that it is out,” Stokes said. “I had to consider the fact it was the last ball of the over, and I questioned the umpires as to whether they had called over. Both umpires were walking towards their opposite position. Jonny left his crease to come out and have the conversation between overs like every batsman does".
If it's true that even one of the umpires had stared walking off for the end of the over then clearly the ball must be dead and he couldn't be given out.
The relevant parts of Law 20 are in
Bold type. If the umpire at the bowler's end had called 'over' then the ball is dead. Moving from his position behind the stumps does not constitute calling 'over' - an umpire at the bowlers end would normally move to a position in line with the crease to adjudicate on run-outs if batsmen are running between the wickets. What happened at Lords isn't dissimilar to a 'Mankad dismissal'
www.skysports.com/cricket/news/12123/12708892/mankad-dismissals-no-longer-deemed-unfair-saliva-banned-as-mcc-law-changes-come-into-force20.1 Ball is dead
20.1.1 The ball becomes dead when
20.1.1.1 it is finally settled in the hands of the wicket-keeper or of the bowler.
20.1.1.2 a boundary is scored. See Law 19.7 (Runs scored from boundaries).
20.1.1.3 a batter is dismissed. The ball will be deemed to be dead from the instant of the incident causing the dismissal.
20.1.1.4 whether played or not it becomes trapped between the bat and person of a batter or between items of his/her clothing or equipment.
20.1.1.5 whether played or not it lodges in the clothing or equipment of a batter or the clothing of an umpire.
20.1.1.6 under either of Laws 24.4 (Player returning without permission) or 28.2 (Fielding the ball) there is an offence resulting in an award of Penalty runs. The ball shall not count as one of the over.
20.1.1.7 there is contravention of Law 28.3 (Protective helmets belonging to the fielding side).
20.1.1.8 the match is concluded in any of the ways stated in Law 12.9 (Conclusion of match).
20.1.2 The ball shall be considered to be dead when it is clear to the bowler’s end umpire that the fielding side and both batters at the wicket have ceased to regard it as in play.
20.2 Ball finally settled
Whether the ball is finally settled or not is a matter for the umpire alone to decide.
20.3 Call of Over or Time
Neither the call of Over (see Law 17.4), nor the call of Time (see Law 12.2) is to be made until the ball is dead, either under 20.1 or under 20.4.
20.4 Umpire calling and signalling Dead ball
20.4.1 When the ball has become dead under 20.1, the bowler’s end umpire may call and signal Dead ball if it is necessary to inform the players.
20.4.2 Where either umpire is required to call and signal Dead ball under 20.4.2.1 to 20.4.2.14, the ball will be considered to be dead at the instant of the incident causing the ball to become dead. However, where the Law specifically provides for the call to be delayed, so as not to disadvantage the non-offending side, under Law 25.7 (Restriction on the striker’s runner), Law 34.4 (Runs permitted from the ball lawfully struck more than once), Law 41.2.1 (Unfair actions) and Law 42.1.2 (Unacceptable conduct), the ball will be considered to be dead at the point of the call.
Either umpire shall call and signal Dead ball when
20.4.2.1 intervening in a case of unfair play.
20.4.2.2 a possibly serious injury to a player or umpire occurs.
20.4.2.3 leaving his/her normal position for consultation.
20.4.2.4 one or both bails fall from the striker’s wicket before the striker has had the opportunity of playing the ball.
20.4.2.5 the striker is not ready for the delivery of the ball and, if the ball is delivered, makes no attempt to play it. Provided the umpire is satisfied that the striker had adequate reason for not being ready, the ball shall not count as one of the over.
20.4.2.6 the striker is distracted by any noise or movement or in any other way while preparing to receive, or receiving a delivery. This shall apply whether the source of the distraction is within the match or outside it. Note also 20.4.2.7. The ball shall not count as one of the over.
20.4.2.7 there is an instance of a deliberate attempt to distract under either of Laws 41.4 (Deliberate attempt to distract striker) or 41.5 (Deliberate distraction, deception or obstruction of batter). The ball shall not count as one of the over.
20.4.2.8 the bowler drops the ball accidentally before delivery.
20.4.2.9 the bowler throws the ball towards the striker’s end before entering his/her delivery stride
20.4.2.10 the ball does not leave the bowler’s hand for any reason other than an attempt to run out the nonstriker under Law 38.3 (Non-striker leaving his/her ground early).
20.4.2.11 satisfied that the ball in play cannot be recovered.
20.4.2.12 he/she considers that either side has been disadvantaged by a person, animal or other object within, or over, the field of play. However, if both umpires consider the ball would have reached the boundary regardless of the intervention, the boundary shall be awarded. See Law 19.2.7 (Identifying and marking the boundary).
20.4.2.13 the striker attempts to play the ball and no part of his/her bat or person, whether grounded or raised, remains within the pitch as defined in Law 6.1 (Area of pitch).
20.4.2.14 he/she is required to do so under any of the Laws not included above.
20.5 Ball ceases to be dead
The ball ceases to be dead – that is, it comes into play – when the bowler starts his/her run-up or, if there is no run-up, starts his/her bowling action.
20.6 Dead ball not to be revoked
Once the ball is dead, no revoking of any decision can bring the ball back into play for that delivery.
20.7 Dead ball; ball counting as one of over
20.7.1 When a ball which has been delivered is called dead or is to be considered dead then, other than as in 20.7.2,
20.7.1.1 it will not count in the over if the striker has not had an opportunity to play it.
20.7.1.2 unless No ball or Wide ball has been called, it will be a valid ball if the striker has had an opportunity to play it, except in the circumstances of 20.4.2.6 and Laws 24.4 (Player returning without permission), 28.2 (Fielding the ball), 41.4 (Deliberate attempt to distract striker) and 41.5 (Deliberate distraction, deception or obstruction of batter).
20.7.2 In 20.4.2.5, the ball will not count in the over only if both conditions of not attempting to play the ball and having an adequate reason for not being ready are met. Otherwise the delivery will be a valid ball.
© Marylebone Cricket Club 2017