Hi Grahame
On my D610, there is a Custom Setting e4 called "Exposure Compensation for Flash". This gives a choice of "Entire Frame" or "Background Only". The effect of this setting is as follows
A. Shutter Priority
With "Entire Frame" selected, EC (which changes the Aperture) affects both the background exposure (ambient light) and the subject exposure (Flash light). With "Background only" selected, EC only affects the background exposure.
B. Aperture Prioity
The setting doesn't really have any effect because in this mode, shutter speed is varied with EC and provided that the shutter speed remains below the flash sync speed, it wont affect the flash exposure.
According to the manuals, the D810 also has this Custom Setting but the D800 doesn't.
Dave
PS: In Manual Mode, all EC does is change the exposure bar indication.