If the sun is out of your frame and you are worried about flare, reach up with your hand and shade the lens from the sun, verifying your hand isn't in the shot. Voila.
Flare right now has gotten hip along with vignetting and grain and all the other old-school artifacts.
If you do architectural photography for a living you of course ought to get both of those fine lenses. The 17 is probably my next big EF purchase, I don't have the 24, and I don't do architectural photography for a living.