Full Idea
There are three distinct versions of Leibniz's Law, all traced to remarks made by Leibniz: the Identity of Indiscernibles (same properties, same thing), the Indiscernibility of Identicals (same thing, same properties), and the Substitution Principle.
Gist of Idea
At different times Leibniz articulated three different versions of his so-called Law
Source
Cynthia Macdonald (Varieties of Things [2005], Ch.2)
Book Reference
Macdonald,Cynthia: 'Varieties of Things' [Blackwell 2005], p.63
A Reaction
The best view seems to be to treat the second one as Leibniz's Law (and uncontroversially true), and the first one as being an interesting but dubious claim.