Changed the insert statement for the ports to include an ON DUPLICATE KEY clause.  This fixed the issue that I had been able to recreate on my development copy - will want Andres to test on his to see if it also resolves his.

#230