[XML] Why can't I drag my custom lever past the gate?

I’m making a custom power lever using “ASOBO_GT_Lever_DraggingYAxis_Gates”. I
have created a template that allows me to set idle where I need it, but if I
put my custom animation code in I cannot drag the lever past the first gate.
The lever animates fine if I use the physical throttle on my desk or the key
assignments. I can drag it from Position 0 through 1, but it cannot go past it
using the mouse. If I push the lever forward using the key bindings and click
it while it’s past the detent, then I can drag it between idle and max power.
As soon as I leave it near idle, though, clicking it makes the bug return. If
I don’t use at all, the drag function works fine, but then the animation will
have to be redone for idle to be at 50% of travel. While doable, it is not
efficient. This is the code I’m using for animation of the lever, which breaks
only the drag function at the gate.

                    (L:ENGINE_Lever_Power_#ID#, Percent) 0 >= if{ 
                        (L:ENGINE_Lever_Power_#ID#, Percent over 100) 1 #IDLE_ANIM_PCT# - #ANIM_LENGTH# * * #IDLE_ANIM_PCT# #ANIM_LENGTH# * + 
                    } els{
                        (L:ENGINE_Lever_Power_#ID#, Percent over 100) 1 + #IDLE_ANIM_PCT# #ANIM_LENGTH# * * 
                    }

IDLE_ANIM_PCT comes from the exterior.xml ASOBO_Ski_Template So why do you use
this? Can you share the rest of your logic?