Cycles gets stuck on 'Updating Shaders' on random frames about 75% of the time.

The first 3 frames rendered fine and to an hour each. I went to bed leaving it rendering. In the morning, it had got stuck on ‘Updating shaders’ which had been about 9 hours by the time I went to see how it was going.

So I cancelled the render and tried again, This time, frame 4 rendered fine. Sometimes it gets stuck on a frame, other times not and it seems to be random, but it rarely renders more than 3 frames before getting stuck.

I have not used bitmap textures, only procedurals, often in fairly complex node groups.

I was using Blender 2.78c with CPU rendering with ‘experimental’ mode because I was using micro displacement - might this have something to do with it?

I have found that it is the material of one set of objects that causes the ‘Updating Shaders’ freeze. They all share the same material. When i hide all but one, the render is fine with one of them rendering. When I hide all but 2, it renders 20-something frames then hits the updating Shaders freeze. Any more than 3 rendering, and the same problem as above. I am now thinking I might need to bake some of the textures. The sad thing about that, is that ideally, they’d stay procedural so I can have animated changes to them.

When the updating Shaders freeze happens, my PC is nowhere near its max RAM or CPU usage. It must only be an internal Blender limit. Any way I can increase this limit?