Fix panic caused by nil pointer deference. when

* Triggered when considering a tx for a mining template that has
dependancies in the mempool.