Let me amplify a bit on AUG's answer. When putting batteries or solar cells in series, the net result of that string is limited by the string's item with the smallest capacity. If you put a 6v 400AH battery in series with a 6v 370AH battery, you'll essentially end up with a 12v 370AH capacity. This is hard to mentally picture when talking about solar cells, but talking about a battery makes it easier to understand. Imagine trying to drain that string of batteries down until it stops putting out power; how many AH will you get out of the string before it stops? Even though the larger battery has 400AH capacity, the string will stop at 370AH simply because the smaller battery doesn't have any more electrons available to push down the wire. The final 30AH of the larger battery is just sitting there.
So, if you put the two 400AH batteries (and likewise the two 370AH batteries) in series, you'll maximize the usefulness of each battery since none of them are limited by a smaller capacity battery in the same string.
Once you have these two individual strings (12v 400AH and 12v 370AH), you can parallel these and you'll end up with 12v 770AH. The rule is that when putting them in parallel, you'll get the lowest voltage of any of the individual strings - so you'll get 12 volts since that is what each string has - and the current / capacity of the strings gets added up.
Therefore, the configuration that you suggested in the base note is the correct one, but perhaps now you see why your configuration was the right one!
Craig