backport to hotfix/v5.4.4-patch of patch 3310250: from fenner:
 misc fixes for debugging output of agentx