I have to agree with Ralph. Most (all?) of the negative reviews I've seen (including the recent article on this site) involve pixel-peeping. If your goal is to view small sections of your shots at 100% on a monitor, then the 40D may be a better choice. Then again, the 30D might be even better, as it will enlarge the flaws even less than the 40D. But if your goal is to make photographs, the extra resolution of the 50D gives numerous advantages. And yes, it takes a good lens to get the most out of the 50D (and the 40D), but even with merely good lenses, at reasonable print sizes, the 50D will give you more detail than a 40D at the same print size.
What do I mean by "reasonable"? Well, I wouldn't use a 17-85 to shoot images I planned to enlarge to 20x30 no matter what body I was shooting with. But based on some limited tests of my own, and other images I've seen on varous web sites, I believe that at 13x19 the 50D will produce images with more detail than the 40D, by a small margin, no matter the lens. Heck, that's probably true even at 20x30, but the images would likely be disapointing from either camera unless the glass was exceptional.
And if you need to crop the original shot before making the 13x19, the 50D image will hold up better than the 40D. What these pixel peepers seem to forget is that to get the same print size out of the 40D and 50D, you'll either be downsampling the 50D image, or upsampling the 40D one. Upsample a 40D image to 15 MP and see how quickly the image deteriorates.