The former Labor leader has been dealt a fresh blow after a court found a homophobic tweet exposed his political rival to “hatred” and “ridicule”.