you should be able to tell from the angles if new flats are needed...
on one side of the meridian the sky angle will be X and the rotator angle Y. if you don't rotate the camera, then post flip, the sky angle will be X+180 but the rotator angle will be the same. in this case no new flats are needed because the camera angle did not change.
if you do rotate the camera after a flip, then the sky angle will be the same pre- and post- flip, but the rotator mechanical angles will be 180 degrees different.
i write both angles to the filename so i can keep this all straight. i guess that you can't necessarily know what the pier side was unless you have images of the same object pre and post meridian to compare the angles. on the other hand the pier side is not really the salient info for whether or not you need different flats - it's the rotator mechanical angle which is important. in the worst case the date/time and RA will tell you what side of the pier the OTA was on, but that takes a little work to compute.
are both the rotator mechanical angle and sky angle written to the FITS header??