There are two separate rulings: (1) the prostration inside the prayer does not discharge the prostration incurred by hearing an outsider; (2) performing it does not itself invalidate the prayer.
Insufficiency of the prostration and validity of the prayer are distinct legal conclusions.