Anyway, what I was doing in the old file, which probably isn't a good idea processor-wise, was to make everything covered by the water shader and then effectively hide the water shader by using other surface shaders on top of it. It was my third Terragen project file, after all, so I was still learning the most basic of basics.
It is of course better to mask the water shader instead, which probably will reduce my rendering times significantly too, so that's what I am doing in my new version, adding the water shader as a child to a surface shader, and masking it with a painted shader. It makes so much more sense, doesn't cause the render to go black, and it's faster.