This makes CheckInputs do the following:
- If sigchecks are found in cache, return them.
- If cache miss and checks are not deferred, then accumulate the total of inputs' sigchecks, store them in cache if requested, and then finally return those.
- If cache miss and checks are deferred, return 0 sigchecks.