I've found the 17-40 comparable with the 16-35 between apertures of f/8 - f/11. f/4 is a bit tricky though and best avoided unless left without an option.I think that sums it up - if you are shooting primarily landscapes with a tripod or are doing studio work between f/8 and f/11 it probably doesn't matter which lens you buy - you may as well choose the cheaper option which is the 17-40. If you need to shoot at f/4, the 16-35mm is probably better. And of course if you want the subject isolation you get with f/2.8 or you want to shoot action, the 16-35 is probably your choice.
I've would recommend that the OP should go through the image threads for both the lenses and (i) try to see the difference in IQ; and (ii) decide which lens has "mojo" that you are looking for.
+1 They're different lenses for different purposes and budgets. If you don't need UWA at f/2.8-4 then save enough for a holiday and get the 17-40. You'll probably do a straight swap $wise for your EFS 10-22.
noun, plural mo·jos, mo·joes.
1. the art or practice of casting magic spells; magic; voodoo.
2. an object, as an amulet or charm, that is believed to carry a magic spell.
3. A Cuban seasoning of garlic, olive oil, and sour (Seville) oranges used as a dip, marinade, or sauce.
Don't look to your hardware to provide the mojo, that comes from within.