FIX: function bodies were not copied before rebinding.