backwards solve Neck modular rig is broken

Hey

I’m trying to create a modular rig to clean up mocap animations in Unreal, but the backwards solve isn’t working properly.

The first character is the skeletal rig with the base animation plus a basic modular rig: with a root, spine, and neck (layered).
The second is just the base animation.
The third is a bake of the animation to the rig.

I’ve started looking at the module blueprint, but I’m having a hard time debugging it.

Any help is appreciated.