A proposed European Union (EU) directive aimed at protecting clothing and textile businesses from counterfeit brands has been undermined by a European Court of Justice (ECJ) ruling.