Where transactions contain LastResource, they may not be fully recoverable. Check if LastResource records are written to the log and if so, what happens to them during recovery.
Optimise the case where a tx contains multiple last resources, as we need to write a log for such a tx only if it also contains real resources. The case where the tx only has a single resource enlisted is irrelevant as the onePhaseCommit optimization already skips logging.