We cannot fix this. Meaning, it is not possible to know what pages are programmatically assigned until after all of the scripts have run by the player.
So, instead, we should perhaps add some text on the Publish Warning page? Can you think up some text -- it would be displayed only for advanced games -- saying that you "May" have orphaned pages?
Make sense?