Heineken has had its legal challenge against rival brewer InBev dismissed.