Required Resources in Confluence Gadget

We have a CustomField that requires some of our JS/CSS.
If I use the Filter Result Gadget within Confluence the needed Resources are loaded
Custom Field Velocity Template


This doesn’t seem to work if I use the same confluence Macro in Confluence. It seems that the additional Resources are not beeing loaded.
I managed to find a maybe related issue:

Does anyone have a workaround for this, That don’t require to copy the existing Jira Internal Gadget?