Redmine#4227: logging-related memory corruption from namespaced call of edit_line bundle

see https://cfengine.com/dev/issues/4227

Acceptance test in staging.  Memory corruption in malloc(), ticket has the backtrace

@sigurdteigen for your review