Fix preferring earlier candidates

If Accept header has 'application/xml, application/json' and we pass ['application/json', 'application/xml'], we expect to get 'application/xml' as a result because it goes first in Accept header.