This shall fix both existing code (bpy mapping, and local/lib usages checks), and new Main->relations generation.