The handling of library for IDs added to a PartiaWriteContext in 'make local' mode (i.e. to make them local in the written blendfile) was flacky, leading to invalid removal of the ID name from the library ID namemap in G_MAIN. Now simply esure there is a local copy of the library too when adding an ID to the context, even if it will be made local there.