the light problem can ccme from the fact Sun is always the last dynamic light out of the 8 available, and this shader uses only the 1st 3 as I remember. you can define the actual number of light affecting a terrain chunk by iLights.
I had disappearing terrain only 2 times: 1) when scaled a terrain of a wmb level after, and 2) when applied a clipped or not check.