Save/restore PortInsert state fully (fixes #3901).