I defined the background color as white in the first and the third block and in the second block as black.
No, you did not and that's the problem.
- Your first file as well as the third do not contain any /screencolor definition.
- The <defaults> element in your second file sets /screencolor to black.
As a consequence, the screencolor defined in <defaults> will apply to all elements.