That's a very naive understanding of weapons exports.
All big-ticket military hardware is subject to transfer to third party nations. Many countries even have laws on it. That is the reason countries like Jordan and Turkey still need US approval for sale of their older F16s to Pakistan.
This is a passage from an article re the F16 sale.
Another defence ministry official Rear Admiral Mukhtar Khan, however, said the US had so far not objected to the deal with Jordan, but under the current environment getting American approval for the sale, a mandatory requirement, would not be easy to manage.
You can also educate yourself with this
https://www.state.gov/t/pm/rsat/c14021.htm
http://www.dtic.mil/dtic/tr/fulltext/u2/a272992.pdf - a declassified report that, amongst others, comments on Russian restrictions on third party sales and how China avoided those by reverse-engineering
Chinese interest in the Su-35 is, going by past experience, limited to reverse engineering the jet - a commendable feat in itself if accomplished. Sale of that reverse engineered jet is not prohibited but there's no legal way China can onward sell Russian arms to Pakistan (or any other country) without prior Russian approval.