I've already faced this situation several times: given a statement (in area of thermodynamics) I used it to provide an example of some perpetual motion machine (of first or second kind). Therefore, I thought, proving the initial statement wrong. And sometimes I get a response that I haven't actually constructed a perpetual motion machine. Because the temperature reservoirs I use will eventually change their temperatures. Ergo, my construction is not perpetual.
I'm pretty sure that the argument is invalid (not to say -- silly). But I still can be wrong.
Whatever the case. I'd like to have a consistent way of rejecting it (or accepting and using it) starting from first principles and definitions of thermodynamics. References dealing with that argument are also welcome.