add some debug tracing to invoice generation, RT#11452