This loop ends by returning the initial bindings, but it should return the new binding

Nevermind, the problem is obvious. When the function is called with the argument of zero, then the error happens.

I would delete this but apparently I don’t have the permissions to delete this.