Ruling frustrates hopes to resolve a bitter 135-year dispute between the two Latin American neighbours.