Rebind callback dynamic variables upon entry into the callback function. With this fix callbacks can be called recursively.