(cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad)
(cherry picked from commit 779e9fdc2de9bfebc5f0a4c9d5f42e389fdd8593)
Leaving xpr unflattened since we want modularity to replace that with xpc (XPluginComposite) at some point (cherry picked from commit 48e6a75fbdd0fee86e364f02ace83f20b312a2b2)