In reading through this, I found it much easier to read/reason about the branches without having to double check the double negation and relevant syntax by just having this more readable variable.
hasWitness might be misleading, since the witness flag could still be missing.
Perhaps supportsWitness or witnessCompatible?