The 17-40 can be good, but you have to stop down. Use it at 24-28mm and f/11 for good edge to edge sharpness. That's the case with other lenses as well (except Tilt- shift). Use it at f/11 - f/16 depending on the depth of field you need.
After f/11, all lenses are basically the same, because diffraction becomes the limiting factor, so don't expect a expensive lens to be noticeably better at f/16. Check the MTF charts at the test sites, the results start to equalize at f/8, by f/11 they are similar, and by f/16 they will be identical.
The beauty of a TS-E is that you can get a greater depth of field without stopping down so far, which means better results by using the optimum aperture. You can use that 17mm TS-e at f/8 or even a little wider aperture.
In any event, the point is that when you are doing landscape, you must stop down to get depth of field, and then spending $$$$ additional only gives a tiny bit of improvement, or virtually none at f/16.
Canon 24mm TS-E