When copying a local ID into a library, or a linked ID into a different
library, the 'linked' tags would not be properly preserved or set, and
the relative file paths would not be properly remapped.
These issues were not currently exposed (no existing code could trigger
them), but some of these fixes are needed for upcoming refactor of the
partial write code.
NOTE: not very happy with the split in library handling between
`BKE_id_copy_in_lib` and `BKE_libblock_copy_in_lib`, this will have to
be solved at some point.
Pull Request: https://projects.blender.org/blender/blender/pulls/123247