This is potentially problematic, but probably not for the reasons you expect.
By all means, ensure that you raise this when you make your second submission. Provide a detailed description of the problem and your modifications. Set this apart from the revisions requested in response to reviewer comments, though. In addition, inform the deputy editor in charge of your manuscript that this has happened.
The reason I state that this is problematic is because some journals have been taken to task by late additions to the text that were inserted during the later stages of review when only minor modifications are expected. Let me give you an example of one such incident. A manuscript describes the effectiveness of a new way to mitigate the harmful effects of soil erosion in the coastal areas of Malaysia. It's reported primary and secondary outcomes, while showing a positive effect, was lacking in practical significance. The manuscript's reviews were generally positive. During the third round, the authors inserted (without any prompting from reviewers or editorial staff) a new outcome that was substantially positive. This insertion consisted of a single sentence in a 3,500-word third revision. No one spotted it and it proceeded to publication.
When it was published, the authors issues press releases highlighting the effectiveness of the program but using the newly inserted outcome as the headline. "New technique reduces cuts soil erosion by 90%!" The journal received complaints from the reviewers stating that internal processes were breached, that the outcome did not undergo proper peer review, etc etc. Internal investigations were conducted. External arbiters were engaged. The main author was traumatised and had to go on leave because of the flak she was getting.
This incident was described to us by staff of another journal in my field during our regular get-togethers a few years ago now. It's caused us to be very wary about late insertions.
In the final analysis, you need to protect yourself from these allegations by being forthcoming about the revisions you plan on making.
Good luck.