Avoid repeated lookups in mapOrphanTransactions and mapOrphanTransactionsByPrev

As it says on the tin.