Hi there!
Ok, so yes, right now it does fill the palette, and by the looks of it it makes duplicates. But I don't know where the red ones are coming from, running it on the same theme I get this:
It does create a new palette, but from my testing it was always a pretty good match unless you used more than the selected maximum colours, I will have to do some more testing here.
... ok, that may just be a bug, will check. It will reserve one palette entry for the IndiMask flag, though maybe I need an option to not do that as well where getting that last colour in is important.
I will have a bit of a poke around, see if any of these are quick fixes.