BHP's legal strategy backfired spectacularly.