Batting Out of Order at End of Inning


 
The batting order is #1, then #2, #3, #4, #5, and #6. #3 strikes out for the 2nd out of the inning. #5 then gets up and flies out for the 3rd out of the inning. Before any of the infielders leave the infield, the defensive coach appeals that #5 batted out of order. Which of the following should the plate umpire do:
 
A. Since #5 made the last out of the inning, the inning is over. #6 will lead off when that team returns to bat.
B. #5 batted in the wrong position, so #5 is out.  #6 will lead off when that team returns to bat.
C. Since #4 failed to bat in his proper position, #4 is out. #5 will lead off and bat again when the team returns to bat.
D. None of the above
 
Bonus Question: Does the answer change if the defensive coach appeals AFTER the teams have exchanged positions and his defensive team is about to bat?
 
Call
When a half inning ends and all the infielders have left the diamond, an improper batter becomes the proper batter and the results of the improper's at-bat become legal (NF 7-1-1 PEN3).
 
In the situation below, #4 was the proper batter (since #4 follows #3 on the line-up). #5 was an improper batter. Since this batting-out-of-order was discovered in time, the proper batter (#4) is out, since he failed to bat at the proper time. When this team bats again, #5 will be expected to lead off the inning (answer "C").
 
Bonus question: If the batting-out-of-order is discovered too late, then #5 has completed his at-bat and #6 will be expected to lead off the next inning (answer "A").