Related:
There is an issue for pay-to-script-hash were an address spending txid won't be added to the address index if script.isScriptHashIn() doesn't return true, which does a check for standard script types, instead of referencing the previous output script to see if it's a pay-to-script-hash.