I am going to look at this question from a logical real-world point of view.
The robot does not break the second law; but technically, it does break the second. That said, the rules would only be a condensed explanation of far more intricate logic and computer code.
To quote Issac Asimov's laws of robotics:
Rule 1:
A robot may not injure a human being or, through inaction, allow a human being to come to harm.
Rule 2:
A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.
Rule 3:
A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.
In the given situation, the robot had to act, in order to save either Will or the child. The robot, being capable of calculating odds to a near-perfect prediction rate, is able to establish that it can not act in enough time to save both Will and the child; and the odds say that Will has a better chance to survive. In such a case, it is only logical to choose Will. This is a key plot point; robots run off pure logic - a fact that makes them differ greatly from human beings.
When the robot fails to also save the child, it is causing harm through inaction. However, again, the robot knows that it is impossible to save both Will and the child. It picks the best option, in order to best adhere to its rules. This is where a greater understanding of computers and the rules, themselves, come in to place.
What would actually happen, considering the explicit rule
The rules are not an absolute fact. They are not there to say "robots will never harm a human, and will always save the day, when present". We know this by how the movie plays out. The rules are simply the rules used to govern the actions of the robots, in-verse. As a programmer, this is something that is blatantly obvious to me; but I am confidant that it is not as so for others that are not familiar with how strictly adherent any computer system is.
The point is, the rule does not state anything about it "not counting" because the robot is "already saving someone". As such, only considering this explicit rule (as any computer or robot would interpret, at least), there is no allowance for a situation where the robot can only save one of two people in danger. In actual computer science, only considering the explicit rule, such an event would likely cause an infinite loop. The robot would stop where it was, and continue to process the catch-22 forever; or atleast, until its logic kicked it out of the thought process. At this point, the robot would dump its memory of the current event, and move on. In theory.
What would probably happen, in-verse
In verse, the rules are a lot more complicated; at least, internal to the robot. There would likely be a whole lot of special cases, when processing the core rules, to determine how to act in such situations. As a result, the robot is still able to act, and takes the most logical outcome. It only saves Will, but it does save someone.
It is far more understandable that the rules would be simplified to three generic common-case situations; it would be far less believable that people would be so easily trusting of robots if the rule read "A robot may not injure a human or, through inaction, allow a human being to come to harm; unless in doing so, there is greater chance of preventing another human from coming to harm". There are just way to many ways to interpret this.
So as far as the explicit rules go, the robot does not break the second rule; disobeying Will's action does not go against "preventing a human from coming to harm through inaction", because through disobeying Will, it saves Will. However, it does break the rule of "through inaction, allow a human being to come to harm".
In regards to how the robot would actually process these rules, it would not be breaking the rules, at all. There would be a far more complex series of "if.." and "else.." logic, where the robots logic would allow it to go against these base rules in situations where logic dictates that no matter what option, a human would still come to harm.
This is further established, towards the end of the movie;
The robots are able to effectively establish martial law, and in doing so, harm several humans; they have developed enough to establish that by harming a few humans in effectively imprisoning the rest of the population, they prevent far more harm through all of the various actions we like to get up to that both risk, and in some cases take, our lives.