The historic judgement is the first time the broadcasting watchdog has lost a judicial review in relation to the code.