Initialization of disabled servos with trim PWM

Hello, I ran into such a problem. Prior to using ArduPlane 4.0, when initializing Pixhawk 2.1 Cube, servos with SERVO * _FUNCTION set to 0 (disabled) were enabled with trim PWM. Now they turn on from 0 PWM.
I tried to fix this using LUA scripts, but I didn’t figure out how to change SERVO * _FUNCTION from 94 (script1) to 0 in the script itself. Otherwise, then you cannot change PWM on this servo via Mavlink.
I would be very grateful for your help in solving this problem.