in reply to cgi mysteriously called twice (instead of just once)
If it were me I would look at the server's log files just to be safe. Are there perhaps two http requests for the same script when there should only be one? Your problem could be something as simple as an unintended Server Side Include, or a hidden frame on a page.