This fixes the root cause of #147541. However, the file in the report is still in a bad shape. It needs to be resaved after this patch so that appending the node group works as expected. The issue was that making a data-block local did not clear the `ID_FLAG_LINKED_AND_PACKED` flag. Pull Request: https://projects.blender.org/blender/blender/pulls/147603