add more debug tracing to invoice generation, RT#11452