Section 8g of the Flag Code says "the flag should never have placed upon it, nor on any part of it, nor attached to it any mark, insignia, letter word, figure, design, picture, or drawing of any nature."
Well then, what about flag stamps? With a denomination and ultimately -- if it sees mail use -- a cancellation, how can the USPS treat the flag in such a way? Section 8i holds that it's against code to have anything "printed or otherwise impressed" or to have the flag image on "anything that is designed for temporary use or discard."
Well, I guess that's their loophole: the flag stamps are made for stamp collectors, who believe stamps are forever and never discard a philatelic item.