Rava makes a few statements in the gemara:
1. Chatas that is shechted for chatas even for a different aveira is kasher and works for the owner (rashi), but if it is shechted for o'lah it is entirely passul (rashi).
2. Chatas of Reuven that is shechted for Shimon, if he is obligated in a chatas it is passul, but if he is obligated in an o'lah it is kasher.
3. Chatas of Reuven that is shechted for Shimon who is not obligated in anything is passul because he is definitely at least chayev in an aseh. Rambam (pesulei hamukdashin 15:9) writes: maybe Shimon is actually obligated in that korban just doesn't remember.
The most obvious question is: If when we shecht Reuven's chatas for Shimon who is chayev an olah, it is kasher, but if Shimon isn't chayev anything it is passul (because it could apply to an aseh that shimon must have violated)? Rashi 7b explains that when it is shechted for Shimon who has no need for it, such as when Shimon has just designated a korban o'lah for all his aseh violations, it is kasher. But, if Shimon hasn't designated an o'lah it is needed by Shimon for his aseh violations and therefore would be invalid as a shinuy ba'alim.
In case #2 where Reuven's chatas is shechted for Shimon who is obligated in an o'lah, the gemara just says that it is kasher but doesn't make it clear whether or not it works for it's original owner. Rambam (pesulei hamukdashin 15:8) writes that it is kasher and doesn't work for the original owner. Minchas Chinuch (138) asks on the Rambam how he knows that if it is shechted for Shimon who is obligated in an o'lah, it would not work for Reuven? Since by a korban chatas the kashrus of it seems to go hand in hand with it working for the original owner, it would seem more logical that it should work for the owner since the shinuy of using it for Shimon's olah doesn't invalidate it?
The Rambam seems to understand that the rationale that only when Reuven's korban is brought for Shimon who is chayev in a korban "like him" will it be passul, to the exclusion of an o'lah, only helps to maintain the kashrus of the chatas but doesn't help to allow Reuven to fulfill his obligation. In order for Revuen to fulfill his obligation it MUST be brought for Reuven, not for Shimon, even when Shimon is only chayev an olah.