beastliness was code for buggery

Didn't know that, shanks. Suppose I could have guessed.
As you say, "beastliness" may indeed have covered a multitude of uh, sins. But wouldn't masturbation have had a category all of its own? Buggery is an entirely different ball-game, after all.

Maybe we shall never know.

Incidentally, "ball-game" reminded me of that wonderful expression "pocket billiards"!