Transform From Spline in control rig destroys mesh

I am following this tutorial almost exactly, which is supposed to let a number of bones follow a spline defined by control bones. However, the method seems to compress my mesh to a singularity.

The model before transformations (placeholder model):

The model after transformations:

My code:

I’ve tried various combinations of reversing the array of control bones, of transformed bones, playing around with the up vector of the Transform From Spline and different models. I am exporting from Blender, and I have played around with export settings a bit, but not exhaustively.

Anybody encountered anything like this?