fix issue where getrawtransaction RPC call does not work for transactions in an orphaned block