I haven´t used polivectors enough to feel confident in helping you out.
Out of memory, I recall one can start and end each polivector call, and should have at least 3 points within that that should be called in an anti-clockwise order.
I think you also can´t have some commands in between start and end poly.
I ran and read your code and it seems ( I could be wrong) that you are only calling polystart an polyend once and that will always draw a single polygon, you would have to call that again or probably put that inside a loop to call it as many times as you have full separated shapes.
If you want to resolve the thing in a single call, like your code shows, you could use the polynewstrip command?
That would lift the "pen" and create disconnected shapes.
I suspect though that calling polystart/end for each closed shape is a better solution and am confident I have seen code for that around the forum.
If I can find it I will add here, otherwise we just wait a bit for a more knowledge user to pop by.