Although the code doesn't work as intended, it can still work in a sense. As nested forms are invalid, as far as I know all browsers will handle the problem by ignoring the starting tag for the inner form, and end the form at the ending tag of the inner form.
So, as long as the inner form is at the end of the outer form, it will be a single form containing all the fields, and will be posted to the action of the outer form.
While there will be some extra fields included when you upload a file, that would hardly account for so much data that the upload size would be noticably reduced. Perhaps it's the fact that the data is posted to a different page than intended that causes the problem.