Instanced terrain normals bugging in custom shader

In my custom terrain shader which support terrain instancing, the normals cause problems, why does this happen?