Fix scoping issue when passing objects to plugin code.
Use derived bindings to fix the "missing OK/Cancel buttons" bug.

Instead of toggling "instantApply" global preference, we create a
derived "prefwindow" that always thinks that the "instantApply"
preference is false.