The flyout workspace always operates on the parent workspace's variable map when creating variables, renaming them, etc. All of the flyout workspace's variable-related functions are bound to the parent workspace's functions. It would be better to point the variableMap to the correct object and not rebind so many functions.
https://github.com/google/blockly/blob/master/core/flyout_base.js#L251
The flyout workspace always operates on the parent workspace's variable map when creating variables, renaming them, etc. All of the flyout workspace's variable-related functions are bound to the parent workspace's functions. It would be better to point the variableMap to the correct object and not rebind so many functions.
https://github.com/google/blockly/blob/master/core/flyout_base.js#L251