Strange that the Thai computerized system didn't pick up on the fact that they issued two non-immigrant visas to the the same person (same name, date of birth) on two different passports?
Just out of interest, what kind of non-imm visa was it? (I seem to remember you said you were married to a Thai lady so you'd be eligable for a non-imm O marriage visa.) If so then this might be of interest to you.
Multi-entry Non-o Marriage - Singapore - Thailand Forum
According to the mod on there you can get one in Singapore without having to put the 400K into a Thai bank account.