In #2368 (comment), Ryosuke comments:
There should be no difference between closed and open shadow trees for ::theme. ::theme should always penetrate shadow boundaries. Otherwise, it defeats the primary use case of ::theme.
I would think that letting ::theme() penetrate closed shadows defeats the primary purpose of having a closed shadow in the first place. I'm happy to go either way, tho.