Every time I had this happen it was because the officer failed to notice that the visa is multiple entry and still valid. They assumed that I'll be returning on a visa exempt entry.
Polish Embassy also. But they issue a letter informing Thai immigration about this. When I was departing Thailand with my new passport, the officers at the land border crossing requested it when transferring stamps. When changing passport number at the bank, they also wanted to see it. So even that letter is useful.