They gained no advantage before the ball went dead. Once it was dead, advantage could not apply.
No, they did
not gain an advantage before the ball went dead. They had the
opportunity to gain an advantage. The advantage is realized by making it dead if 22.7 (a) is applied and a 22DO is awarded.
You are arguing that 22.7 (a) trumps other laws. However they are specific to a knock-on or throw-forward, so they trump 22.7 (a).
Another way of putting it is that the advantage you would like them to have is one that would be given to them only by your preferred version of the law, but not by any positive rugby action, such as kicking to gain ground, or picking up and running.
OB, you are falling into the trap of judging the legal actions of players by your vision of how the game should be played.
I am following the law in that advantage is supposed to "make play more continuous with fewer stoppages for infringements." Grounding the ball stops play.
How would you judge this: Red kick the ball into Blue's goal. Blue get there first and ground the ball. Is that 'negative play'? Would you deny them the 22DO? How is that different from Red knocking on in/into goal and Blue grounding it?
The situations are covered by different parts of the laws. Knock-on into in-goal is an unintentional act. Kick into in-goal is a deliberate act (even though it may be misjudged).
The law on kicking the ball into in-goal was introduced to discourage that tactic. The law on the outcome of a knock-on was deliberately changed from awarding a drop out.
The fact that the law once did award a drop out, and was deliberately changed is surely evidence enough of what the law makers want.
You have applied the chronological introduction of the laws to arrive at your preferred interpretation.
They made a series of changes all aimed at ensuring that a knock-on is treated as an infringement with a scrum sanction instead of a drop out. Somehow you think they wanted to leave the door open for a drop out. You have no chance of convincing me of that.
You will also claim that specificity overrides generality.
It would be nonsense to have it the other way round.
I could agree with you on the latter if the knock-on was written as an exception, but it is not and it is written in a more general form without regard to how the ball is made dead.
22.7 (a) is generic. How do you justify ignoring 22.7 (b)? By arguing that it does not count because it is not phrased as an exception? It counts because it is part of the law, and the only sensible way of making both paragraphs mean something is to recognise that it is in practice an exception even if not specifically written as such..