GIMP_METADATA_SAVE_* are bit fields so use | to test for bits in 'flags'.