A much neater way of dealing with the situation where the ball enters the goal directly from the hand of an attacker would be via Law 10 rather than Law 12. Law 10 already states that where a goalkeeper throws the ball directly into the attackers goal the restart is a goal kick. This could be extended to say that a goal kick is awarded whenever the ball enters the goal directly from the hand of the attacking team, or where it strikes the hand of an attacker and that player then puts the ball into the goal. The current arrangement make an accidental handball an offence but only in a particular case and that's a bit messy. There is already a long list of circumstances where a ball entering the goal results in a goal-kick rather than the award of a goal, and adding accidental handball would be straightforward.