Material Fails To Compile Migrating from 4.7->4.8

enter code hereI have a world material here. It uses a few textures, lots of material blending. It was working fine in 4.7 but after upgrading to 4.8 I get:

Engine/Shaders/MaterialTemplate.usf(1717,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(1776,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(1842,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(1967,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(2079,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(2117,2): Shader FEvaluateSurfelMaterialCS, VF None:
	 warning X3206: implicit truncation of vector type
Engine/Shaders/MaterialTemplate.usf(1225,1): Shader FEvaluateSurfelMaterialCS, VF None:
	 error X4532: cannot map expression to cs_5_0 instruction set

How can I start tracking this down? I haven’t really been able to narrow down a specific node that’s causing it.

I had a custom node, that was basically something to the effect of:

return length( float2( ddx( someVar ), ddy( someVar ) ) );

Apparently that borked everything. Replaced it with the equivalent set of material expression nodes and now it works.

I am also experiencing a similiar issue but the material is pretty complex and I could not really identify the problem (and therefore not the solution) yet. I think it has something to do with material functions. I will post the solution when I acquire one.