Additional debugging printouts, added while analysing Bugzilla 5272 but generally useful. No functional change, and should be optimized away when DEBUG is set false.