The issue is that, with it closed, I am getting a mirc error saying "no such connection."
Which is correct, as mIRC cannot send instructions to a connection that is closed.
This was exactly the point I was trying to get across earlier.
Connection ID's do not reset until mIRC exits. Opening and closing connections simply keeps increasing the number of CID's until mIRC exits.