I think the changes in the law over the last few years are a problem with this incident - because I don't believe the changes were meant to address this, but they can be interpreted as such... and the changes, I mean: mention of coming back from an offside position, and that "gaining advantage" is mentioned in the context of deflections and saves and not in the context of interfering with an opponent.
I am with
@one on this. My friend (and newly appointed ref trainer) cited rule 18: common sense. It's not specifically covered in the book, the attacker was close enough to very quickly make a challenge, therefore offside.
Has anyone written to IFAB yet for this?