This latest ruling in the McCann v Amaral libel trial (so far as I can judge) doesn't dispute that Amaral breached judicial secrecy in writing his book, but rather argues that because Amaral quit the PJ before he wrote it, he can't be held responsible (for breaching judicial secrecy).
However, if there is, in Portuguese law, a concept of accountability, then Amaral might be held accountable for the leaks on his watch (much shorter than Rebelo's watch, even though, under Rebelo, there was one leak, not particularly injurious to Kate and Gerry; even though media scrutiny of the investigation was just as intense, and even though Rebelo's tenure in charge was much longer than Amaral's).
If Rebelo could do it, why couldn't Amaral?
And if Amaral is accountable (for the leaks during his tenure in charge) even if he can't be held, personally and directly, responsible for them, sanity (and proper order) should be restored.