Hello!
Dynamic categories work by adding the function to a dictionary object. So what's happening under the hood when you override this is like this:
```
// Blockly defines the dynamic category.
let flyoutCategoryBlocks = function() { /* generate category */ };
// Blockly adds it to a dictionary object (this isn't actually how it works, but for demonstration purposes).
dictionaryObject['dynamic_category'] = flyoutCategoryBlocks;
// You redefine flyoutCategoryBlocks.
flyoutCategoryBlocks = function() { /* generate category */ };
// Blockly calls the function on the dictionary object, which is the original function.
dictionaryObject['dynamic_category']();
```
Instead of redefining flyoutCategoryBlocks you want to redefine what is on the dictionary object.
```
myWorkspace.registerToolboxCategoryCallback(
'VARIABLE_DYNAMIC', myDynamicFlyoutFunction);
```
I hope that helps! If you have any further questions please reply =)
--Beka