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