A person taking any interest in an intermediated security for value (unless the interest acquired is a security interest) takes free of a security interest if it is a consensual transaction (presumably this means the transaction is not a mistake or a fraud) and they have no actual or constructive knowledge that the transaction breaches the terms of a security agreement that governs a security interest over the intermediated securities1.
This extinguishment rule extinguishes security interests over the intermediated securities granted by anyone, not just the immediate seller.
Section 51 is silent on the point but presumably the extinguishment rule applies both to intermediated securities listed on a prescribed financial market, and unlisted securities.
Notes:
1 PPSA section 51 (link)