Fix use-after-free in miner_tests, fix signed mismatch warning in pmt_tests