Fix logic for stretching imagery to the edge of terrain.

It wasn't correctly accounting for non-global imagery.  This manifested as artifacts when zoomed out when using the high-res imagery I grabbed for Orange County for the SIGGRAPH demo.  This might fix #416, too, but I'm not sure.