Fixes a bug that was causing MATLAB to crash (!) when running testWingForceGradients.