Fixes T49495, but since proxies are hard to get right, this really needs reviewing and thorough testing.
This patch requires that a scene is appended to the current blend file, and that the "Localize all" is not checked. The appended proxy object should also not be referenced from anything in a library (for example in a constraint). Referencing it from the appended data should be fine.
I've tested using:
- unzip
- open Blender
- File → Append → untick "Localize all" → select shot_file.blend/Scenes/test_scene
- Switch to test_scene
- Play around with the proxied armature, or play back the animation.