ok that top-to-bottom flip is definitely caused by the fits reader settings. more accurately it is produced by a mismatch between the application that wrote the file and the application reading the file.
PI is going to use the same reader setting for all FITS files, unless you override it in BPP/WBPP or by passing a format hint to a process reading the fits file. so you don't have to worry about the flats mismatching, unless of course you made the masters with one fits reader setting and then changed the setting when you are calibrating the lights.
if everything was made with the same fits reader setting you can just mirror your integrated image manually at the end if you can tell that the image is upside-down.