That's unfortunate but can't blame the seller to sell to the first one dropping cash on the table.
You did not pay any deposit so the car was still for sale. I know you wanted the NCT to pass before paying a deposit, but this played against you.
Don't worry you can always find a better example.