Two if's before sending an inventory message
I don't see any reason for the second if statement, either. I'm not speaking from any form of authority here, but it looks like a (tiny) efficiency bug to me.

The second if statement has been around since the first commit. The first if statement was inserted about a year later when "trickling" of tx inv messages was added, presumably to check the set membership earlier to avoid running through the trickling logic when it's not necessary. I'd guess that the removal of the second if was simply overlooked.