I think the 17-40L actually does better at 24mm at f8-f11 then the 24-105.
Dare I say it - particularly in the corners. Yes, even though the 17-40 has a bad reputation in the corners and you still get people saying the 24-105 is 'as sharp as a tack', the above is true in my experience.
Plus you can go wider than 24mm.
I'm a little biased because I use 17-24 mm a lot, and have tested the overlap of these at f5.6-f16 and the 17-40 wins.
However, if you think 24mm is really going to be wide enough, then the 24-105 gives you that extra flexibility of FL + IS. But purely for IQ in the f7-f16 range; the 17-40 has the edge (to the edge).