The Tzitz Eliezer then quotes the Shu”t Pri Sodeh, who brings a different rayah that one is yoitza the mitzvah of tefillin.
What’s the halachah, if after many years one discovers that the sefer Torah he has been leining from has a pasul that has been there for many years? Do we really say that he hasn’t fulfilled the mitzvah of krias haTorah all these years, and that all the berachos were levatolah? It can’t be, it must be that since his heart and mind were in the correct place he is yoitza, and even though now it’s pasul, that’s from now and on, but retroactively it is considered kosher.
However, who says the above is in fact true? And more to the point, the Tzitz Eliezer quotes a Teshuvah from the Rambam in his Pe’er HaDor who was asked about whether one can make a berachah on a pasul sefer Torah and the Rambam said that one could, as the berachah is not going on reading from the sefer Torah, rather, it is going on the mitzvah of talmud Torah d’rabbim, and whether the sefer Torah is kosher or not, there has been talmid Torah d’rabbim. So, we can’t bring a rayah from the case of a sefer Torah where the berachah is not actually going on the sefer Torah, to a case of tefillin, where the berachah is going on the actual tefillin.
In conclusion, the Da’as Kedoshim, Ben Ish Chai and Pri Sodeh are all of the opinion that one gets reward even if he discovers after many years that his tefillin are pasul.
However, the Tzitz Eliezer is not so convinced and maintains that if the tefillin are pasul one doesn’t get any reward.