SpeedTree shader not working on 5.2.2

The same project was working on Unity 5.1.x but now we have the following error on Samsung Galaxy S3:

Unity ( 5186): -------- failed compiling:
D/Unity ( 5186): vertex shader
D/Unity ( 5186): -------- GLSL error:
D/Unity ( 5186):
D/Unity ( 5186): 0:1: F0003: Shader too long. This shader is 531 instruction words long, but
D/Unity ( 5186): Mali-400 GP only supports up to 512 instruction words.
D/Unity ( 5186): Note: Creation of internal variant of shader ‘Nature/SpeedTree’ failed.

5.3.1 seems to have fixed this. Logcat still spits the shader source out, but without the error at least.