refs: fix interleaving hook calls with reference-transaction hook