I had to look at your two sentences several times to realize that they were not identical! I would say that "herself" refers to Mary in the first sentence and Sally in the second. eipjoo 1) Mary appeared to Sally to like herself.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
eipjoo1) Mary appeared to Sally to like herself.= It appeared to Sally that Mary liked herself.
eipjoo2) Mary appealed to Sally to like herself