Can't change speed with DO_CHANGE_SPEED during RTL near home

We are trying to slow down our copter before approaching home during RTL, using mavlink DO_CHANGE_SPEED or relative Lua binding, but it doesn’t work properly near the target waypoint, even if we’re still in the constant speed segment of the SCurve.
I’ve just done some test in SITL, sending DO_CHANGE_SPEED to 5 m/s with mavproxy (long MAV_CMD_DO_CHANGE_SPEED 0 5) at different distances from home:

  1. ~300 m from home: it works, the speed slow down from 10 m/s to 5 m/s as requested
  2. 77 m from home: it partially works, the speed slow down, but it stop decelerating at around ~7 m/s, instead of reaching 5 m/s
  3. 62 m from home: it just doesn’t decelerate at all

Considering the default jerk of 1 m/sss and acceleration of 2.5 m/ss:

  • decelerate from 10 m/s to 0 m/s requires 35 m;
  • decelerate from 10 m/s to 5 m/s requires 37 m;
  • decelerate from 5 m/s to 0 m/s requires 15 m.

So it should be possible to first decelerate to 5 m/s if distance to target is > 52 m. I’ve tried to look in main code, and I see the motion law is calculated in SCurve.cpp.
Do you know why I’m encountering this behaviour? Is this by design? Thank you in advance for your help