Don't std::advance past beginning of transactions array. Fixes #465