[#2212] [#2222] CID43792 and CID43790:

null-hijinks utterly avoided with a refactor