When U.S. troops landed on Omaha Beach on D-day, they were pinned down by heavy fire and couldn't move. If some wiseguy had grabbed a megaphone and announced, "I hate to tell you, but this invasion has been grossly mismanaged and we are now stuck in a quagmire," he would not have been wrong. But luckily those soldiers decided that Omaha Beach was no quagmire. They fought their way inland and helped liberate Europe.
The U.S. has been stuck in countless potential quagmires in many wars. Each time, we could have announced "this is a quagmire and we're going home." Thank God we didn't — usually.
While I'm sure that Mr. Gelernter is considered quite the military theorist by his fellow speakers of Klingon, he seems to have missed out on a simple point. Go back and watch the first thirty minutes of Saving Private Ryan and you'll see that the soldiers had something that the soldiers in Iraq currently lack: a goal. Hell, even if their only goal was to get off the beach, it would have been enough. It's easier to keep moving when you have something you're moving toward. Instead, our soldiers in Iraq continue patrolling in circles, waiting for attacks to occur.
When considering whether to define any situation as a quagmire, it's best to remember that it has little to do with "a state of mind" and a lot to do with being stuck.