Edit: The other issue I haven't addressed is the additional detail at F22 which should be apparent at a sufficient distance away from the plane of focus. The purpose of stopping down is usually to gain a greater DoF, albeit sometimes at the expense of some loss of detail at the plane of focus. The scene I shot for this comparison was focussed at or very close to infinity. There's nothing in the scene which is outside of the hyperfocal distance range, with either camera.
I was a bit too quick with that comment. Only from F16 to F32 are the 50D images within the hyperfocal range at all points. From F5.6 to F16 there's a very noticeable progression of increased clarity in the parts of the image closest to the camera. This increase in detail even at F22 (compared with F8), at the closest point to the camera, is significantly greater than the increase in detail at the plane of focus
in the F8 shot, compared with the F22 shot, at the plane of focus.
In other words, even with a 39mp full frame DSLR, there could still be a good reason for using F16 and even F22 when extensive DoF is a priority. The loss
of resolution at the plane of focus, due to the effects of diffraction, appears to be less
than the increase
in resolution away from the plane of focus.
The first set of crops below shows the progressive loss of resolution at the plane of focus, moving from F8 to F32. The second set of crops shows the progressive increase in resolution at the closest point to the camera.
Of course, it hardly needs mentioning, if the 400mm lens had been a high quality prime instead of a medium quality zoom, the crop at F8 (at the plane of focus) would have been noticeably sharper than the crop at F11, instead of being roughly equally sharp. And the crop at F5.6 would have been clearly the sharpest, instead of being marginally less sharp than the F8 crop.
The Canon 100-400 IS is a lens that definitely needs upgrading. For all I know, perhaps recent copies of this lens actually have been improved. There's no reason why Canon should announce each marginal improvement in their production processes and quality control. This design has been around for a long time.