The way I'd propose going about this is as follows:
1. Create a global repository for Random Groups and Custom Blocks. You could put this on the left vertical navigation, i.e. below "AlgoWizard". These will be for blocks that you manage on a global basis, and are never template-specific.
2. Keep the template-specific customizations, but have them always and only apply to that template. When you load a new SQX template file, you just eliminate the old ones and replace with the ones from the template (if any). No need to prompt for a decision to overwrite, create duplicate, or use the original.
I've also experienced endless corruptions of my custom blocks, and for this reason I'm always exporting them to XML to have an intact back up. I'd have to put some work into finding a specific sequence of actions that create the corruptions. But take my word for it - there's something going wrong and it happens frequently. It would be great if this feature was cleaned up so it is reliable.
Thank you.