Another thing that's not really a saying but a reflexive habit: People accepting a compliment that's not really directed at them.
"You have a lovely wife."
Oh, did you design her yourself?
But, "You have a lovely wife." (and that sort of comment) is actually an insult!
The one saying it to you is expressing their disbelief in the fact that such a "lovely" woman would ever have anything to do with you...
The "Thank you"-response only shows that you also find it quite unbelievable that such a person would have anything to do with you -AND implies that you have (had?) some kind of special mojo that got her attention at the time...
Unless the person sounds incredibly shocked that even a lowly schlub could have a lovely wife and expresses that in an exaggerated way, or they're being obviously sarcastic about your wife being lovely and actually mean to imply the opposite, then I don't see what's insulting about it. It's just meant to be a polite compliment in her absence, essentially saying it was pleasant to meet her and that's she's a nice person.
What you're saying would render any kind of compliment an insult. Like saying "You have a nice car" implies that they're actually saying "How did a bum like you get a nice car?", when all they're trying to do is tell you you have a nice car, either to make polite small talk or to commend your good taste.
Nor does it imply that you had anything to do with making her a lovely person, to address scotpens'
comment. It's either complimenting your good judgment in picking a lovely spouse or more likely again just trying to make polite small talk.