There is a setting on the a7R called DRO. It stands for Dynamic Range Optimization, I think, and it is on by default. That sounds like something that could produce the weird effects that I’m seeing.
Here is the entirety of what the manual says about it.
Using the [DRO/Auto HDR] function, you can capture various gradations of the contrast of images.
[D-Range Opt.]: By dividing the image into small areas, the camera analyses the contrast of light and shadow between the subject and the background, and produces an image with the optimal brightness and gradation.
Does it affect raw files? Only one way to find out.
After testing, I’ve concluded that the setting of the DRO function has no effect on raw files. I don’t know whether I’m relieved that I’m not going to have to go back and repeat all those tests, or worried that I’ll never get to the bottom of why this camera behaves the way it does.