Fix problem with gestures and multiple windows.

Add guards in TerrainGesture methods Update and ScrollWheel that check for the correct surface.