That's a really good question, and I don't remember it ever coming up before. I defer to Ted, but I don't know whether he monitors BGG. If you need a ruling before he responds, I would say that you should withdraw an on-map HQ. (The rules say that you cannot withdraw a unit that does not have a line of communication, and I would say that this follows that spirit. I am also assuming that such units were withdrawn because they were needed elsewhere. So in this situation an HQ is still needed elsewhere and that need could only be satisfied by withdrawing a functioning HQ.)
That pretty much confirms my thinking as well.