There's another caveat as well - the function's current form doesn't work very well with the AI. As soon as the AI gets to around 6 moves it just stops functioning.
This could be a general problem of the AI, in particular inability to handle a variant with these rules, which the function enables. The AI normally always considers recapture to the destination of the preceding move, in quiescence search. But the recruiting of the captured piece creates the possibility that such capture sequences continue indefinitely, with infinite recursion (and hence crash of the script) as a consequence.
This could be a general problem of the AI, in particular inability to handle a variant with these rules, which the function enables. The AI normally always considers recapture to the destination of the preceding move, in quiescence search. But the recruiting of the captured piece creates the possibility that such capture sequences continue indefinitely, with infinite recursion (and hence crash of the script) as a consequence.