You don't need a reboot, you can test it on a private environment, or modify the environment of the current process. In fact we already have tests for RtlQueryEnvironmentVariable_U(), and that's how they are implemented.
I did some more testing, and the problem is that Wine populates the PEB Environment differently. So the problem is not actually RtlQueryEnvironmentVariable_U, but how the environment is loaded from the registry. An idea how I would write a test for that?
Regards, Fabian Maurer