Wouldn't a phone call be cheaper than an immediate return flight?
Having never been in one of these immigration-type situations (other than several hours "delay" in PHX for attempting to enter the US without all my visa papers), wouldn't it be prudent to ask to talk to someone at your consulate to see if the matter could be cleared up? Or is this something that would take too much effort over the phone?
I think I would at least try a phone call before boarding again (assuming the foreign immigration officers are reasonable enough to allow me to call my embassy).