You're right, plaw. I retract my previous statement.

From the Official Rules of MLB:

(i) When pitchers are changed during an inning, the relief pitcher shall not have the benefit of previous chances for outs not accepted in determining earned runs. NOTE: It is the intent of this rule to charge relief pitchers with earned runs for which they are solely responsible. In some instances, runs charged as earned against the relief pitcher can be charged as unearned against the team. EXAMPLES: (1) With two out, P1 walks A. B reaches base on an error. P2 relieves P1. C hits home run, scoring three runs. Charge two unearned runs to P1, one earned run to P2. (2) With two out, P1 walks A and B and is relieved by P2. C reaches base on an error. D hits home run, scoring four runs. Charge two unearned runs to P1, two unearned runs to P2. (3) With none out, P1 walks A. B reaches base on an error. P2 relieves P1. C hits home run, scoring three runs. D and E strike out. F reaches base on an error. G hits home run, scoring two runs. Charge two runs, one earned, to P1. Charge three runs, one earned, to P2.