Yes, it was a bluff.
Of course your records are in the immigration system, that is what they are checking against when you leave the country.
If they had followed through on any threat to delay your departure by preventing you from boarding, or had 'detained' you they would have had to formally process you.
As it was apparent the fault lay with an immigration officer not properly processing you passport and as you were in possession of a stamped arivals card they would have looked entirely stupid if they did that, it would also have brought the possibility of a reprimand upon the person who processed your entry.
Stressful as something like that may be in the immediacy of the situation in the same situation I would have demanded to know why I was being detained, and if I was not being detained I would have suggested to them it was time I left as I had an aircraft to board.
The aircraft no doubt already had your bags loaded and to depart the airport they would have needed to come off unless you were boarded, that would have delayed the flight and if there was no reason for detaining you the persons responsible would have been paddling their canoe without the use of a paddle.
Do not allow yourself to be bullied in these situations is probably the best advice that can be given. If faced with something like this just slow it all down and look at the situation objectively, appraise everyones position and then act accordingly.
This of course again underlines the prudence of not losing your arrivals/departure card, and to retain all your boarding passes and ticketing, at least until you get home.
Edited: 3:19 am, September 19, 2012