tx_factory() returns a closure, so the mapping is built only once. i can try to make it clearer though