The code in question:
afaict, that should never happen in production and, if it does, we need to understand why. Also, there should be an error check there because if we didn't find a handler in the registry, we get back an error.
So, task is to remove the check and simply drive deregister, run all tests, and see what breaks. If nothing seems to break, remove the check since it seems to be redundant. Regardless, add error handling and address fallout as necessary.
Also, the following code lives in registerTxID. Again, the check really shouldn't be needed:
Note: This may be related to "dev mode." If so, let's discuss options.