I had the same issue, I solved it by adding them as custom, but you had to enter the Filter detail in the same way it had for the light frames, this resulted in me identifying what was wrong with my flat masters in the first place
If your light frames are added as Red, Green, Blue and Lum but you "Custom" add with RED, GREEN, BLUE and LUM it will not match them as Red is not the same as RED!!!
I chekced all my Masters and they are all in Capitals, changing the headers to match the case of the light frames worked, I worked this out because it did not have any issues with my HA Lights and Flats.
Maybe the script can be changed to not be case sensitive?