You overlooking the or.
Oh goodness. This is not that difficult.

The “or” is a qualifier as well. Read it without the phrase following the “or”.
It reads like this:
“The down shall be replayed if during the down, an inadvertent whistle is sounded while a legal forward pass or snap is in flight, or during a legal kick.” If there is no foul on the play, this is true. We replay the down because of the IW.
Now, insert the “or” qualifier. It reads like this:
“The down shall be replayed if during a down in which the penalty for a foul is declined, an IW is sounded while a legal forward pass or snap is in flight, or during a legal kick.” It’s the same thing! If there is no foul, or the foul is declined, then we replay the down because of the IW.
NONE OF THIS HAS ANYTHING TO DO WITH (d). D states as clearly as can be that an ACCEPTED penalty over rides an IW. In other words, we ignore the IW, and enforce the penalty according to all but one. Basic spot is the previous spot because the foul occurred during a loose ball play.
THE IW NEVER TAKES PRECEDENCE OVER A FOUL. NEVER. AN ACCEPTED FOUL ALEAYS NEGATES AN IW. ALWAYS.
Sent from my iPhone using Tapatalk