When several countries are members of several different trade pacts, which ones take precendence over the others when they conflict with each other?

Japan is for example member of several trade pacts and so is South Korea, so when the rules within these pacts conflict with each other which one of them take precedence over the others? Or are they all considered equal to each other or have provisions for all the different trade pacts already signed and put in place?

<https://en.wikipedia.org/wiki/Category:Free_trade_agreements_of_Japan>