ThemeProvider should automatically detect when it is nested
Currently the ThemeProvider detects whether it is nested by the scope="local"
prop.
It should be possible to automatically detect nesting by calling useTheme() in a similar way to the HydrationChecker detects nesting with useHydrated().