You do not save other mappings the user has made? This way, this feature will only help with buildins, right? I think you should try saving and restoring user mappings here - this might be easier to do in python.