Ron in Texas says:
I use a Canon 17-40 mm on a 5D MkIII and for the most part, it performs well. However, even when shooting north facing windows or otherwise shade-side windows in certain circumstances, l experience lens flare. The inconsistency of it is what drives me crazy. Is there a magic camera-to-window angle or lens height that can help eliminate this pain? I know that some overhead lighting can be a problem and I turn them off when I can but some window situations just seem to be a problem no matter what I do, even at small apertures! For a while, I've tried a polarizing filter, but I found this actually made the problem worse! I think the fact that there were more reflective surfaces in the mix was a problem.
Lens flare is caused by internal reflections in the lens. There are a number of things you can do to reduce or minimize it: