Unfortunatly, I don't think you can get away from ungrateful people. Some people probably see your help as a given, and therefor they don't see any reason to give you thanks. However this will not stop thme from calling you out on, what they consider, bad advice. In there eyes, you are the expert and there for have certain responsibilities.
But just becuase they don't say "Thank you", it doesn't mean they don't appriciate the time and effort you put into helping them. Different people have different ways of showing appreciation.
Personally, I don't really care for appreciation, since I do what I do, for different reasons. The only thing that slightly annoy me, is when people don't update you on whether or not your idea worked.
While a "Thank you" is always nice, I don't require it to keep going.
Maybe you should just see appreciation as the neutral position. When people don't respond in a negative way, they appricate what you have done. Atleast that's what I'll recommend.