Interesting question. I'm inclined to think it doesn't have a good answer.
I'm not aware of any written policy regarding the issuing of flags to warships during the nineteenth century - but I've never done any research in primary sources on the subject. My general impression, though, is that usage of the American flag during this period was extremely casual. For example, it wasn't until fairly recently that the Congress took the trouble to specify the arrangement of the stars. (Contemporary pictures suggest that several patterns were in use during the War of 1812. And during the Revolutionary War there were no standards whatever. Some flags had stars with six points; some stars were ovate, rather than circular. And some had red, white, and blue stripes.)
Throw in the distinct possibility that the ship's sailmaker made a replacement flag, or that the captain bought one ashore, and the problem begins to look insoluble. I think my approach would be to look for a contemporary painting or engraving of the event in question and see if that helps. (It probably won't - especially if the artist put ripples in the flag.) Failing that, I'd be inclined to give the flag the "correct" number of stars - i.e., one for each state that had been admitted to the union at that time.
I'm afraid that's the best I can do. Good luck.
Youth, talent, hard work, and enthusiasm are no match for old age and treachery.