more specifically here’s the rough logic of ImportScript:
0mark dirty
1
2addwatchonly
3
4if is redeem script:
5 addcscript
6 ImportAddress
7else
8 SetAddressBook
And in this case it’s not a redeemscript(last arg is false), so it marks dirty, adds watchonly, and sets address book.
Mark dirty is top-level now, ImportScriptPubKeys takes care of the SetAddressBookWithDB, and both ImportScriptPubKeys and ImportPubKeys adds watch only in specific situations(when pubkey is not already in wallet, or the script is not in the wallet yet). Previously the watchonly script was added when ISMINE was not spendable. I’ll leave it up to other reviewers to figure if this is desired/same semantics.