Don't assume that Kirk would have been prevented from going back and taking the test again after graduation. I have a vague recollection that Kirk transferred from security to command so he might have taken the test a second or third time around that time as a way of strengthening his transfer request.
This was always my thought, that Kirk went back to Starfleet Academy to attend Command School or somesuch. He could have taught the undergrad cadets (including Mitchell) at this time. Essentially, Kirk would have been a grad student.
(To be honest, I would have preferred if they went with something like this in the film, but I suspect the details of Academy academic programs would have been confusing.)